summaryrefslogtreecommitdiffstats
path: root/include/linux/cpu.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2018-07-13 16:23:23 +0200
committerThomas Gleixner <tglx@linutronix.de>2018-07-13 16:29:55 +0200
commit8e1b706b6e819bed215c0db16345568864660393 (patch)
treed26ce3c19992b9bd85676bb3bef68c8854acc7d9 /include/linux/cpu.h
parent895ae47f9918833c3a880fbccd41e0692b37e7d9 (diff)
downloadlinux-stable-8e1b706b6e819bed215c0db16345568864660393.tar.gz
linux-stable-8e1b706b6e819bed215c0db16345568864660393.tar.bz2
linux-stable-8e1b706b6e819bed215c0db16345568864660393.zip
cpu/hotplug: Expose SMT control init function
The L1TF mitigation will gain a commend line parameter which allows to set a combination of hypervisor mitigation and SMT control. Expose cpu_smt_disable() so the command line parser can tweak SMT settings. [ tglx: Split out of larger patch and made it preserve an already existing force off state ] Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Jiri Kosina <jkosina@suse.cz> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lkml.kernel.org/r/20180713142323.039715135@linutronix.de
Diffstat (limited to 'include/linux/cpu.h')
-rw-r--r--include/linux/cpu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 7532cbf27b1d..c9b23ad27b38 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -177,8 +177,10 @@ enum cpuhp_smt_control {
#if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_SMT)
extern enum cpuhp_smt_control cpu_smt_control;
+extern void cpu_smt_disable(bool force);
#else
# define cpu_smt_control (CPU_SMT_ENABLED)
+static inline void cpu_smt_disable(bool force) { }
#endif
#endif /* _LINUX_CPU_H_ */