diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-06-21 10:37:20 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-06-21 14:20:57 +0200 |
commit | f048c399e0f7490ab7296bc2c255d37eb14a9675 (patch) | |
tree | 6c4cac4f34e78864aaba1088c76ac052203f7976 /arch/x86/kernel/smpboot.c | |
parent | x86/smp: Provide topology_is_primary_thread() (diff) | |
download | linux-f048c399e0f7490ab7296bc2c255d37eb14a9675.tar.xz linux-f048c399e0f7490ab7296bc2c255d37eb14a9675.zip |
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.c | 8 |
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 |