From: Ashok Raj Date: Thu, 23 Mar 2006 10:59:57 +0000 (-0800) Subject: [PATCH] x86 topology: don;t create a control file for BSP that cannot be removed X-Git-Tag: v2.6.17-rc1~1080 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=bdaff4a331db46f3bd953f413316c4603c4004b4;p=~emulex%2Finfiniband.git [PATCH] x86 topology: don;t create a control file for BSP that cannot be removed Don't create "online" control file for BSP (i386/x86_64) since its not removable. We originally added this to support ppc64 if the kernel has support but BIOS indicated no offline support, we just didnt create online files for them. We used the same method in ia64 as well, if we have a cpu taking platform interrupts but cannot be removed if those interrupts cannot be re-targeted to another cpu. Signed-off-by: Ashok Raj Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/topology.c b/arch/i386/kernel/topology.c index 67a0e1baa28..296355292c7 100644 --- a/arch/i386/kernel/topology.c +++ b/arch/i386/kernel/topology.c @@ -41,6 +41,15 @@ int arch_register_cpu(int num){ parent = &node_devices[node].node; #endif /* CONFIG_NUMA */ + /* + * CPU0 cannot be offlined due to several + * restrictions and assumptions in kernel. This basically + * doesnt add a control file, one cannot attempt to offline + * BSP. + */ + if (!num) + cpu_devices[num].cpu.no_control = 1; + return register_cpu(&cpu_devices[num].cpu, num, parent); }