aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshok Raj <ashok.raj@intel.com>2006-03-23 05:59:57 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 10:38:07 -0500
commitbdaff4a331db46f3bd953f413316c4603c4004b4 (patch)
treea0c379bb38725c912ae674866e5db1b5d7e44d50
parentaeefc956d5d8f8402216a5447bd72ade9eb37eff (diff)
[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 <ashok.raj@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/i386/kernel/topology.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/i386/kernel/topology.c b/arch/i386/kernel/topology.c
index 67a0e1baa28b..296355292c7c 100644
--- a/arch/i386/kernel/topology.c
+++ b/arch/i386/kernel/topology.c
@@ -41,6 +41,15 @@ int arch_register_cpu(int num){
41 parent = &node_devices[node].node; 41 parent = &node_devices[node].node;
42#endif /* CONFIG_NUMA */ 42#endif /* CONFIG_NUMA */
43 43
44 /*
45 * CPU0 cannot be offlined due to several
46 * restrictions and assumptions in kernel. This basically
47 * doesnt add a control file, one cannot attempt to offline
48 * BSP.
49 */
50 if (!num)
51 cpu_devices[num].cpu.no_control = 1;
52
44 return register_cpu(&cpu_devices[num].cpu, num, parent); 53 return register_cpu(&cpu_devices[num].cpu, num, parent);
45} 54}
46 55