diff options
author | Jan Beulich <jbeulich@novell.com> | 2011-03-14 17:08:00 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2011-03-14 17:08:00 +0000 |
commit | 1d5d9a3590ba6fe78c7598c6c14f23dacdd0db31 (patch) | |
tree | d3ce1bee558887f87b2f42187f37d7438243ef26 | |
parent | 9f6e5982b48e58ebf9f256843a5178473aec7a65 (diff) | |
download | xen-1d5d9a3590ba6fe78c7598c6c14f23dacdd0db31.tar.gz xen-1d5d9a3590ba6fe78c7598c6c14f23dacdd0db31.tar.bz2 xen-1d5d9a3590ba6fe78c7598c6c14f23dacdd0db31.zip |
x86: fix cpu_sibling_map initialization when topology CPUID leaf is present
c/s 21811:12f0618400de broke this by not properly initializing struct
cpuinfo_x86's x86_num_siblings member (other than Linux, where this is
a global variable, it is being maintained per CPU by Xen).
Hyper-threaded CPUs with CPUID leaf 0xb present had therefore all
cpu_sibling_map-s with just a single bit set, thus improperly feeding
the scheduler.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen-unstable changeset: 23037:a29b35408950
xen-unstable date: Mon Mar 14 17:05:21 2011 +0000
-rw-r--r-- | xen/arch/x86/cpu/common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c index 1add6b68ad..9223075691 100644 --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -512,7 +512,7 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) { unsigned int eax, ebx, ecx, edx, sub_index; unsigned int ht_mask_width, core_plus_mask_width; - unsigned int core_select_mask, core_level_siblings, smp_num_siblings; + unsigned int core_select_mask, core_level_siblings; unsigned int initial_apicid; int cpu = smp_processor_id(); @@ -530,7 +530,7 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) initial_apicid = edx; /* Populate HT related information from sub-leaf level 0 */ - core_level_siblings = smp_num_siblings = LEVEL_MAX_SIBLINGS(ebx); + core_level_siblings = c->x86_num_siblings = LEVEL_MAX_SIBLINGS(ebx); core_plus_mask_width = ht_mask_width = BITS_SHIFT_NEXT_LEVEL(eax); sub_index = 1; @@ -554,7 +554,7 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) phys_proc_id[cpu] = phys_pkg_id(initial_apicid, core_plus_mask_width); c->apicid = phys_pkg_id(initial_apicid, 0); - c->x86_max_cores = (core_level_siblings / smp_num_siblings); + c->x86_max_cores = (core_level_siblings / c->x86_num_siblings); if ( opt_cpu_info ) { |