aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2012-03-26 07:16:15 -0400
committerIngo Molnar <mingo@kernel.org>2012-03-27 08:50:10 -0400
commitbc758133ed73d4b06952bec21da23e28e62bf3ba (patch)
treec7d2a8cec16533e7d3b3896f9fdc7c0350b8a041
parent6c16a6dcb05e51ace340ff7bc6dbe647f1593528 (diff)
sched/x86/smp: Do not enable IRQs over calibrate_delay()
We should not ever enable IRQs until we're fully set up. This opens up a window where interrupts can hit the cpu and interrupts can do wakeups, wakeups need state that isn't set-up yet, in particular this cpu isn't elegible to run tasks, so if any cpu-affine task that got created in CPU_UP_PREPARE manages to get a wakeup, its affinity mask will get broken and we'll run into lots of 'interesting' problems. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/n/tip-yaezmlbriluh166tfkgni22m@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/kernel/smpboot.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 58f78165d308..89571a0c4a49 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -219,14 +219,9 @@ static void __cpuinit smp_callin(void)
219 * Update loops_per_jiffy in cpu_data. Previous call to 219 * Update loops_per_jiffy in cpu_data. Previous call to
220 * smp_store_cpu_info() stored a value that is close but not as 220 * smp_store_cpu_info() stored a value that is close but not as
221 * accurate as the value just calculated. 221 * accurate as the value just calculated.
222 *
223 * Need to enable IRQs because it can take longer and then
224 * the NMI watchdog might kill us.
225 */ 222 */
226 local_irq_enable();
227 calibrate_delay(); 223 calibrate_delay();
228 cpu_data(cpuid).loops_per_jiffy = loops_per_jiffy; 224 cpu_data(cpuid).loops_per_jiffy = loops_per_jiffy;
229 local_irq_disable();
230 pr_debug("Stack at about %p\n", &cpuid); 225 pr_debug("Stack at about %p\n", &cpuid);
231 226
232 /* 227 /*