diff options
author | Balbir Singh <sblbir@amazon.com> | 2021-01-08 23:10:52 +1100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2021-07-28 11:42:23 +0200 |
commit | c52787b590634646d4da3d8f23c4532ba050d40d (patch) | |
tree | 89e9164a4490b9f54a7b39c044c0b5ef71c4bc60 /arch/x86/include/asm/processor.h | |
parent | ff1176468d368232b684f75e82563369208bc371 (diff) | |
download | linux-c52787b590634646d4da3d8f23c4532ba050d40d.tar.bz2 |
x86/smp: Add a per-cpu view of SMT state
A new field smt_active in cpuinfo_x86 identifies if the current core/cpu
is in SMT mode or not.
This is helpful when the system has some of its cores with threads offlined
and can be used for cases where action is taken based on the state of SMT.
The upcoming support for paranoid L1D flush will make use of this information.
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Balbir Singh <sblbir@amazon.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210108121056.21940-2-sblbir@amazon.com
Diffstat (limited to 'arch/x86/include/asm/processor.h')
-rw-r--r-- | arch/x86/include/asm/processor.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index f3020c54e2cb..1e0d13c9fda6 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -136,6 +136,8 @@ struct cpuinfo_x86 { u16 logical_die_id; /* Index into per_cpu list: */ u16 cpu_index; + /* Is SMT active on this core? */ + bool smt_active; u32 microcode; /* Address space bits used by the cache internally */ u8 x86_cache_bits; |