* [PATCH] arch/x86: Initialize __max_smt_threads to 1
@ 2017-12-06 12:56 Prarit Bhargava
0 siblings, 0 replies; only message in thread
From: Prarit Bhargava @ 2017-12-06 12:56 UTC (permalink / raw)
To: linux-kernel
Cc: Prarit Bhargava, Jakub Kicinski, netdev, Clark Williams,
Andi Kleen, x86, Thomas Gleixner
A single socket, single core, single thread system has __max_smt_threads
set to 0 since smp_callin() is not called.
__max_smt_threads must be a minimum of 1.
Fixes: b1cbacc8663a ("x86/smpboot: Do not use smp_num_siblings in __max_logical_packages calculation)
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Jakub Kicinski <kubakici@wp.pl>
Cc: netdev@vger.kernel.org
Cc: "netdev@vger.kernel.org"
Cc: Clark Williams <williams@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: x86@kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://marc.info/?t=151246092100004&r=1&w=2
---
arch/x86/kernel/smpboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index eaee15fb7d8b..882c61e1d7a2 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -106,7 +106,7 @@ EXPORT_SYMBOL(__max_logical_packages);
static unsigned int logical_packages __read_mostly;
/* Maximum number of SMT threads on any online core */
-int __max_smt_threads __read_mostly;
+int __read_mostly __max_smt_threads = 1;
/* Flag to indicate if a complete sched domain rebuild is required */
bool x86_topology_update;
--
2.15.0.rc0.39.g2f0e14e64
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-06 12:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 12:56 [PATCH] arch/x86: Initialize __max_smt_threads to 1 Prarit Bhargava
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.