]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
i386: no need to make enable_cpu_hotplug a variable
authorAdrian Bunk <bunk@stusta.de>
Wed, 17 Oct 2007 16:04:38 +0000 (18:04 +0200)
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>
Wed, 17 Oct 2007 18:16:16 +0000 (20:16 +0200)
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>
arch/x86/kernel/topology.c
include/asm-x86/cpu.h

index c25f23eb397cceebe5e73afc62191815fce53455..8caa0b777466218fcb04d4a706ff155588200942 100644 (file)
@@ -44,15 +44,15 @@ int arch_register_cpu(int num)
         * Also certain PCI quirks require not to enable hotplug control
         * for all CPU's.
         */
-       if (num && enable_cpu_hotplug)
+#ifdef CONFIG_HOTPLUG_CPU
+       if (num)
                cpu_devices[num].cpu.hotpluggable = 1;
+#endif
 
        return register_cpu(&cpu_devices[num].cpu, num);
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-int enable_cpu_hotplug = 1;
-
 void arch_unregister_cpu(int num) {
        return unregister_cpu(&cpu_devices[num].cpu);
 }
index 9d914e1e4aad446e649dd8678d856768e637a38d..b1bc7b1b64b0e304d13f907e4d5cd607417bdfee 100644 (file)
@@ -13,9 +13,6 @@ struct i386_cpu {
 extern int arch_register_cpu(int num);
 #ifdef CONFIG_HOTPLUG_CPU
 extern void arch_unregister_cpu(int);
-extern int enable_cpu_hotplug;
-#else
-#define enable_cpu_hotplug     0
 #endif
 
 DECLARE_PER_CPU(int, cpu_state);