diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-05-10 20:31:44 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-05-17 17:09:19 +0200 |
commit | 0270be3e34efb05a88bc4c422572ece038ef3608 (patch) | |
tree | 6cde6ccb097a4c516f2d58d3583943a16b449ecd /arch/x86/include | |
parent | 11fb0683493b2da112cd64c9dada221b52463bf7 (diff) | |
download | linux-stable-0270be3e34efb05a88bc4c422572ece038ef3608.tar.gz linux-stable-0270be3e34efb05a88bc4c422572ece038ef3608.tar.bz2 linux-stable-0270be3e34efb05a88bc4c422572ece038ef3608.zip |
x86/speculation: Rework speculative_store_bypass_update()
The upcoming support for the virtual SPEC_CTRL MSR on AMD needs to reuse
speculative_store_bypass_update() to avoid code duplication. Add an
argument for supplying a thread info (TIF) value and create a wrapper
speculative_store_bypass_update_current() which is used at the existing
call site.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/spec-ctrl.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/include/asm/spec-ctrl.h b/arch/x86/include/asm/spec-ctrl.h index 6e2874049afd..82b6c5a0d61e 100644 --- a/arch/x86/include/asm/spec-ctrl.h +++ b/arch/x86/include/asm/spec-ctrl.h @@ -42,6 +42,11 @@ extern void speculative_store_bypass_ht_init(void); static inline void speculative_store_bypass_ht_init(void) { } #endif -extern void speculative_store_bypass_update(void); +extern void speculative_store_bypass_update(unsigned long tif); + +static inline void speculative_store_bypass_update_current(void) +{ + speculative_store_bypass_update(current_thread_info()->flags); +} #endif |