diff options
author | Ashok Raj <ashok.raj@intel.com> | 2005-06-25 17:55:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:24:30 -0400 |
commit | 76e4f660d9f4c6d1bb473f72be2988c35eaca948 (patch) | |
tree | 3a0b3ae0cc12d6f0d96bf1f3b564f8470e0f72ae /arch/x86_64/kernel/traps.c | |
parent | e6982c671c560da4a0bc5c908cbcbec12bd5991d (diff) |
[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/x86_64/kernel/traps.c')
-rw-r--r-- | arch/x86_64/kernel/traps.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 121646fc43f6..102736630002 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -586,11 +586,17 @@ static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs) | |||
586 | asmlinkage void default_do_nmi(struct pt_regs *regs) | 586 | asmlinkage void default_do_nmi(struct pt_regs *regs) |
587 | { | 587 | { |
588 | unsigned char reason = 0; | 588 | unsigned char reason = 0; |
589 | int cpu; | ||
590 | |||
591 | cpu = smp_processor_id(); | ||
589 | 592 | ||
590 | /* Only the BSP gets external NMIs from the system. */ | 593 | /* Only the BSP gets external NMIs from the system. */ |
591 | if (!smp_processor_id()) | 594 | if (!cpu) |
592 | reason = get_nmi_reason(); | 595 | reason = get_nmi_reason(); |
593 | 596 | ||
597 | if (!cpu_online(cpu)) | ||
598 | return; | ||
599 | |||
594 | if (!(reason & 0xc0)) { | 600 | if (!(reason & 0xc0)) { |
595 | if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT) | 601 | if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 0, SIGINT) |
596 | == NOTIFY_STOP) | 602 | == NOTIFY_STOP) |