Skip to content

Commit

Permalink
[PATCH] x86 topology: don;t create a control file for BSP that cannot…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
ashok-raj authored and Linus Torvalds committed Mar 23, 2006
1 parent aeefc95 commit bdaff4a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/i386/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit bdaff4a

Please sign in to comment.