On Wed, 21 Nov 2018, Thomas Gleixner wrote: > Make the scheduler's 'sched_smt_present' static key globaly available, so > it can be used in the x86 speculation control code. > > Provide a query function and a stub for the CONFIG_SMP=n case. > > Signed-off-by: Thomas Gleixner <t...@linutronix.de> > --- > include/linux/sched/topology.h | 9 +++++++++ > kernel/sched/sched.h | 3 --- > 2 files changed, 9 insertions(+), 3 deletions(-) > > --- a/include/linux/sched/topology.h > +++ b/include/linux/sched/topology.h > @@ -34,10 +34,19 @@ > #define SD_NUMA 0x4000 /* cross-node balancing */ > > #ifdef CONFIG_SCHED_SMT > +extern struct static_key_false sched_smt_present; > + > +static __always_inline bool sched_smt_active(void) > +{ > + return static_branch_likely(&sched_smt_present);
0day just told me that this breaks ia64. /me goes to fix