Commit a850cef7 authored by Adrian Bunk's avatar Adrian Bunk Committed by Thomas Gleixner

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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent fb7ae26d
...@@ -44,15 +44,15 @@ int arch_register_cpu(int num) ...@@ -44,15 +44,15 @@ int arch_register_cpu(int num)
* Also certain PCI quirks require not to enable hotplug control * Also certain PCI quirks require not to enable hotplug control
* for all CPU's. * for all CPU's.
*/ */
if (num && enable_cpu_hotplug) #ifdef CONFIG_HOTPLUG_CPU
if (num)
cpu_devices[num].cpu.hotpluggable = 1; cpu_devices[num].cpu.hotpluggable = 1;
#endif
return register_cpu(&cpu_devices[num].cpu, num); return register_cpu(&cpu_devices[num].cpu, num);
} }
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
int enable_cpu_hotplug = 1;
void arch_unregister_cpu(int num) { void arch_unregister_cpu(int num) {
return unregister_cpu(&cpu_devices[num].cpu); return unregister_cpu(&cpu_devices[num].cpu);
} }
......
...@@ -13,9 +13,6 @@ struct i386_cpu { ...@@ -13,9 +13,6 @@ struct i386_cpu {
extern int arch_register_cpu(int num); extern int arch_register_cpu(int num);
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
extern void arch_unregister_cpu(int); extern void arch_unregister_cpu(int);
extern int enable_cpu_hotplug;
#else
#define enable_cpu_hotplug 0
#endif #endif
DECLARE_PER_CPU(int, cpu_state); DECLARE_PER_CPU(int, cpu_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment