x86/smp: Add a per-cpu view of SMT state
authorBalbir Singh <sblbir@amazon.com>
Fri, 8 Jan 2021 12:10:52 +0000 (23:10 +1100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 28 Jul 2021 09:42:23 +0000 (11:42 +0200)
commitc52787b590634646d4da3d8f23c4532ba050d40d
tree89e9164a4490b9f54a7b39c044c0b5ef71c4bc60
parentff1176468d368232b684f75e82563369208bc371
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
arch/x86/include/asm/processor.h
arch/x86/kernel/smpboot.c