From 4458cd08304423260d199199b1301071331365d3 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Wed, 18 Apr 2012 19:04:09 +0200 Subject: [PATCH] --- yaml --- r: 304992 b: refs/heads/master c: 0acbb440f06302058e1515861dd534594521e892 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/smpboot.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a599afb16c19..9d0e9eec7005 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 94c0dd3278dd3eae52eabf0fb77d472d0dd3e373 +refs/heads/master: 0acbb440f06302058e1515861dd534594521e892 diff --git a/trunk/arch/x86/kernel/smpboot.c b/trunk/arch/x86/kernel/smpboot.c index 6e1e406038c2..edfd03a9e390 100644 --- a/trunk/arch/x86/kernel/smpboot.c +++ b/trunk/arch/x86/kernel/smpboot.c @@ -337,6 +337,11 @@ void __cpuinit set_cpu_sibling_map(int cpu) for_each_cpu(i, cpu_sibling_setup_mask) { struct cpuinfo_x86 *o = &cpu_data(i); +#ifdef CONFIG_NUMA_EMU + if (cpu_to_node(cpu) != cpu_to_node(i)) + continue; +#endif + if (cpu_has(c, X86_FEATURE_TOPOEXT)) { if (c->phys_proc_id == o->phys_proc_id && per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i) && @@ -360,11 +365,17 @@ void __cpuinit set_cpu_sibling_map(int cpu) } for_each_cpu(i, cpu_sibling_setup_mask) { +#ifdef CONFIG_NUMA_EMU + if (cpu_to_node(cpu) != cpu_to_node(i)) + continue; +#endif + if (per_cpu(cpu_llc_id, cpu) != BAD_APICID && per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { cpumask_set_cpu(i, cpu_llc_shared_mask(cpu)); cpumask_set_cpu(cpu, cpu_llc_shared_mask(i)); } + if (c->phys_proc_id == cpu_data(i).phys_proc_id) { cpumask_set_cpu(i, cpu_core_mask(cpu)); cpumask_set_cpu(cpu, cpu_core_mask(i));