Commit 3b7e02f8 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] x86: no interrupts from secondary CPUs until officially online

Andi Kleen reported a problem where a very slow boot caused the timer
interrupt on a secondary CPU to go off before the CPU was actually brought
up by the core code, so the CPU_PREPARE notifier hadn't been called, so the
per-cpu timer code wasn't set up.

This was caused by enabling interrupts around calibrate_delay() on
secondary CPUs, which is not actually neccessary (interrupts on CPU 0
increments jiffies, which is all that is required).  So delay enabling
interrupts until the actual __cpu_up() call for that CPU.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1fd2fff2
......@@ -1046,9 +1046,7 @@ void __init setup_boot_APIC_clock(void)
void __init setup_secondary_APIC_clock(void)
{
local_irq_disable(); /* FIXME: Do we need this? --RR */
setup_APIC_timer(calibration_result);
local_irq_enable();
}
void __init disable_APIC_timer(void)
......
......@@ -383,8 +383,6 @@ void __init smp_callin(void)
setup_local_APIC();
map_cpu_to_logical_apicid();
local_irq_enable();
/*
* Get our bogomips.
*/
......@@ -397,7 +395,7 @@ void __init smp_callin(void)
smp_store_cpu_info(cpuid);
disable_APIC_timer();
local_irq_disable();
/*
* Allow the master to continue.
*/
......@@ -439,6 +437,10 @@ static void __init start_secondary(void *unused)
*/
local_flush_tlb();
cpu_set(smp_processor_id(), cpu_online_map);
/* We can take interrupts now: we're officially "up". */
local_irq_enable();
wmb();
cpu_idle();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment