Skip to content

Commit

Permalink
x86: Set cpu masks before calling CPU_STARTING notifiers
Browse files Browse the repository at this point in the history
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 <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1290077254-12165-2-git-send-email-andi@firstfloor.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Andi Kleen authored and Ingo Molnar committed Nov 26, 2010
1 parent 9639882 commit 5ef428c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ static void __cpuinit smp_callin(void)
*/
smp_store_cpu_info(cpuid);

/*
* This must be done before setting cpu_online_mask
* or calling notify_cpu_starting.
*/
set_cpu_sibling_map(raw_smp_processor_id());
wmb();

notify_cpu_starting(cpuid);

/*
Expand Down Expand Up @@ -316,10 +323,6 @@ notrace static void __cpuinit start_secondary(void *unused)
*/
check_tsc_sync_target();

/* This must be done before setting cpu_online_mask */
set_cpu_sibling_map(raw_smp_processor_id());
wmb();

/*
* We need to hold call_lock, so there is no inconsistency
* between the time smp_call_function() determines number of
Expand Down

0 comments on commit 5ef428c

Please sign in to comment.