aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2016-03-18 11:03:48 -0400
committerThomas Gleixner <tglx@linutronix.de>2016-03-19 05:26:40 -0400
commit63d1e995be455ae9196270eb4b789de21afd42ed (patch)
tree209f75e65c7d6959b590e146bc9bde88e05c5aa4
parentb5d5f27d938fb6fc8d3202704e699d2694a02da6 (diff)
x86/topology: Fix Intel HT disable
As per the comment in the code; due to BIOS it is sometimes impossible to know if there actually are smp siblings until the machine is fully enumerated. So we rather overestimate the number of possible packages. Fixes: 1f12e32f4cd5 ("x86/topology: Create logical package id") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: aherrmann@suse.com Cc: jencce.kernel@gmail.com Cc: bp@alien8.de Cc: Mike Galbraith <umgwanakikbuti@gmail.com> Link: http://lkml.kernel.org/r/20160318150538.611014173@infradead.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/kernel/smpboot.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 64b669dcbf23..81e6a432f23c 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -312,8 +312,21 @@ static void __init smp_init_package_map(void)
312 /* 312 /*
313 * Today neither Intel nor AMD support heterogenous systems. That 313 * Today neither Intel nor AMD support heterogenous systems. That
314 * might change in the future.... 314 * might change in the future....
315 *
316 * While ideally we'd want '* smp_num_siblings' in the below @ncpus
317 * computation, this won't actually work since some Intel BIOSes
318 * report inconsistent HT data when they disable HT.
319 *
320 * In particular, they reduce the APIC-IDs to only include the cores,
321 * but leave the CPUID topology to say there are (2) siblings.
322 * This means we don't know how many threads there will be until
323 * after the APIC enumeration.
324 *
325 * By not including this we'll sometimes over-estimate the number of
326 * logical packages by the amount of !present siblings, but this is
327 * still better than MAX_LOCAL_APIC.
315 */ 328 */
316 ncpus = boot_cpu_data.x86_max_cores * smp_num_siblings; 329 ncpus = boot_cpu_data.x86_max_cores;
317 __max_logical_packages = DIV_ROUND_UP(nr_cpu_ids, ncpus); 330 __max_logical_packages = DIV_ROUND_UP(nr_cpu_ids, ncpus);
318 331
319 /* 332 /*