summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2018-06-21 10:37:20 +0200
committerThomas Gleixner <tglx@linutronix.de>2018-06-21 14:20:57 +0200
commitf048c399e0f7490ab7296bc2c255d37eb14a9675 (patch)
tree6c4cac4f34e78864aaba1088c76ac052203f7976 /arch/x86/kernel/smpboot.c
parent6a4d2657e048f096c7ffcad254010bd94891c8c0 (diff)
x86/topology: Provide topology_smt_supported()
Provide information whether SMT is supoorted by the CPUs. Preparatory patch for SMT control mechanism. Suggested-by: Dave Hansen <dave.hansen@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index f9c731240142..7f7def989fb0 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -275,6 +275,14 @@ bool topology_is_primary_thread(unsigned int cpu)
}
/**
+ * topology_smt_supported - Check whether SMT is supported by the CPUs
+ */
+bool topology_smt_supported(void)
+{
+ return smp_num_siblings > 1;
+}
+
+/**
* topology_phys_to_logical_pkg - Map a physical package id to a logical
*
* Returns logical package id or -1 if not found