Skip to content

Commit 5ef428c

Browse files
Andi KleenIngo Molnar
authored andcommitted
x86: Set cpu masks before calling CPU_STARTING notifiers
When booting up a CPU set the various topology masks before calling the CPU_STARTING notifier. This way the notifier can actually use the masks. This is needed for a perf change. Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 9639882 commit 5ef428c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

arch/x86/kernel/smpboot.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ static void __cpuinit smp_callin(void)
281281
*/
282282
smp_store_cpu_info(cpuid);
283283

284+
/*
285+
* This must be done before setting cpu_online_mask
286+
* or calling notify_cpu_starting.
287+
*/
288+
set_cpu_sibling_map(raw_smp_processor_id());
289+
wmb();
290+
284291
notify_cpu_starting(cpuid);
285292

286293
/*
@@ -316,10 +323,6 @@ notrace static void __cpuinit start_secondary(void *unused)
316323
*/
317324
check_tsc_sync_target();
318325

319-
/* This must be done before setting cpu_online_mask */
320-
set_cpu_sibling_map(raw_smp_processor_id());
321-
wmb();
322-
323326
/*
324327
* We need to hold call_lock, so there is no inconsistency
325328
* between the time smp_call_function() determines number of

0 commit comments

Comments
 (0)