diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-03-07 12:12:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-07 13:07:24 -0500 |
commit | d04f41e35343f1d788551fd3f753f51794f4afcf (patch) | |
tree | 50f22b1deab312476254868e8ec8c0c592c3d3e0 /arch/x86_64/kernel | |
parent | 08e15e81a40e3241ce93b4a43886f3abda184aa6 (diff) |
[PATCH] CPU hotplug: call check_tsc_sync_source() with irqs off
check_tsc_sync_source() depends on being called with irqs disabled (it
checks whether the TSC is coherent across two specific CPUs). This is
incidentally true during bootup, but not during cpu hotplug __cpu_up().
This got found via smp_processor_id() debugging.
disable irqs explicitly and remove the unconditional enabling of
interrupts. Add touch_nmi_watchdog() to the cpu_online_map busy loop.
this bug is present both on i386 and on x86_64.
Reported-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r-- | arch/x86_64/kernel/smpboot.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 35443729aad8..cd4643a37022 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
@@ -923,8 +923,9 @@ void __init smp_prepare_boot_cpu(void) | |||
923 | */ | 923 | */ |
924 | int __cpuinit __cpu_up(unsigned int cpu) | 924 | int __cpuinit __cpu_up(unsigned int cpu) |
925 | { | 925 | { |
926 | int err; | ||
927 | int apicid = cpu_present_to_apicid(cpu); | 926 | int apicid = cpu_present_to_apicid(cpu); |
927 | unsigned long flags; | ||
928 | int err; | ||
928 | 929 | ||
929 | WARN_ON(irqs_disabled()); | 930 | WARN_ON(irqs_disabled()); |
930 | 931 | ||
@@ -958,7 +959,9 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
958 | /* | 959 | /* |
959 | * Make sure and check TSC sync: | 960 | * Make sure and check TSC sync: |
960 | */ | 961 | */ |
962 | local_irq_save(flags); | ||
961 | check_tsc_sync_source(cpu); | 963 | check_tsc_sync_source(cpu); |
964 | local_irq_restore(flags); | ||
962 | 965 | ||
963 | while (!cpu_isset(cpu, cpu_online_map)) | 966 | while (!cpu_isset(cpu, cpu_online_map)) |
964 | cpu_relax(); | 967 | cpu_relax(); |