Commit a850cef77f148c2e305022a1ed86ca6cff5ee300

Authored by Adrian Bunk
Committed by Thomas Gleixner
1 parent fb7ae26df0

i386: no need to make enable_cpu_hotplug a variable

As long as there's no write access to this variable there's no reason to
let gcc check it at runtime.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Showing 2 changed files with 3 additions and 6 deletions Side-by-side Diff

arch/x86/kernel/topology.c
... ... @@ -44,15 +44,15 @@
44 44 * Also certain PCI quirks require not to enable hotplug control
45 45 * for all CPU's.
46 46 */
47   - if (num && enable_cpu_hotplug)
  47 +#ifdef CONFIG_HOTPLUG_CPU
  48 + if (num)
48 49 cpu_devices[num].cpu.hotpluggable = 1;
  50 +#endif
49 51  
50 52 return register_cpu(&cpu_devices[num].cpu, num);
51 53 }
52 54  
53 55 #ifdef CONFIG_HOTPLUG_CPU
54   -int enable_cpu_hotplug = 1;
55   -
56 56 void arch_unregister_cpu(int num) {
57 57 return unregister_cpu(&cpu_devices[num].cpu);
58 58 }
include/asm-x86/cpu.h
... ... @@ -13,9 +13,6 @@
13 13 extern int arch_register_cpu(int num);
14 14 #ifdef CONFIG_HOTPLUG_CPU
15 15 extern void arch_unregister_cpu(int);
16   -extern int enable_cpu_hotplug;
17   -#else
18   -#define enable_cpu_hotplug 0
19 16 #endif
20 17  
21 18 DECLARE_PER_CPU(int, cpu_state);