提交 5ef428c4 编写于 作者: A Andi Kleen 提交者: Ingo Molnar

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: NAndi Kleen <ak@linux.intel.com>
Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1290077254-12165-2-git-send-email-andi@firstfloor.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 96398826
...@@ -281,6 +281,13 @@ static void __cpuinit smp_callin(void) ...@@ -281,6 +281,13 @@ static void __cpuinit smp_callin(void)
*/ */
smp_store_cpu_info(cpuid); 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); notify_cpu_starting(cpuid);
/* /*
...@@ -316,10 +323,6 @@ notrace static void __cpuinit start_secondary(void *unused) ...@@ -316,10 +323,6 @@ notrace static void __cpuinit start_secondary(void *unused)
*/ */
check_tsc_sync_target(); 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 * We need to hold call_lock, so there is no inconsistency
* between the time smp_call_function() determines number of * between the time smp_call_function() determines number of
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册