diff options
author | Ashok Raj <ashok.raj@intel.com> | 2005-06-25 14:55:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 16:24:30 -0700 |
commit | 76e4f660d9f4c6d1bb473f72be2988c35eaca948 (patch) | |
tree | 3a0b3ae0cc12d6f0d96bf1f3b564f8470e0f72ae /arch/i386/mach-default | |
parent | e6982c671c560da4a0bc5c908cbcbec12bd5991d (diff) | |
download | kernel_samsung_smdk4412-76e4f660d9f4c6d1bb473f72be2988c35eaca948.zip kernel_samsung_smdk4412-76e4f660d9f4c6d1bb473f72be2988c35eaca948.tar.gz kernel_samsung_smdk4412-76e4f660d9f4c6d1bb473f72be2988c35eaca948.tar.bz2 |
[PATCH] x86_64: CPU hotplug support
Experimental CPU hotplug patch for x86_64
-----------------------------------------
This supports logical CPU online and offline.
- Test with maxcpus=1, and then kick other cpu's off to test if init code
is all cleaned up. CONFIG_SCHED_SMT works as well.
- idle threads are forked on demand from keventd threads for clean startup
TBD:
1. Not tested on a real NUMA machine (tested with numa=fake=2)
2. Handle ACPI pieces for physical hotplug support.
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Acked-by: Andi Kleen <ak@muc.de>
Acked-by: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Signed-off-by: Shaohua.li<shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/mach-default')
-rw-r--r-- | arch/i386/mach-default/topology.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/i386/mach-default/topology.c b/arch/i386/mach-default/topology.c index 5b3e881..23395ff 100644 --- a/arch/i386/mach-default/topology.c +++ b/arch/i386/mach-default/topology.c @@ -73,12 +73,11 @@ static int __init topology_init(void) { int i; - for (i = 0; i < MAX_NUMNODES; i++) { - if (node_online(i)) - arch_register_node(i); - } - for (i = 0; i < NR_CPUS; i++) - if (cpu_possible(i)) arch_register_cpu(i); + for_each_online_node(i) + arch_register_node(i); + + for_each_cpu(i) + arch_register_cpu(i); return 0; } @@ -88,8 +87,8 @@ static int __init topology_init(void) { int i; - for (i = 0; i < NR_CPUS; i++) - if (cpu_possible(i)) arch_register_cpu(i); + for_each_cpu(i) + arch_register_cpu(i); return 0; } |