diff options
author | Michal Suchanek <msuchanek@suse.de> | 2018-04-24 14:15:56 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-06-03 20:43:44 +1000 |
commit | 815069ca57c142eb71d27439bc27f41a433a67b3 (patch) | |
tree | 776b7b8a934e55dd4aaab3e52051b8e8d895dd2d /arch/powerpc/include | |
parent | 2eea7f067f495e33b8b116b35b5988ab2b8aec55 (diff) | |
download | talos-obmc-linux-815069ca57c142eb71d27439bc27f41a433a67b3.tar.gz talos-obmc-linux-815069ca57c142eb71d27439bc27f41a433a67b3.zip |
powerpc/64s: Patch barrier_nospec in modules
Note that unlike RFI which is patched only in kernel the nospec state
reflects settings at the time the module was loaded.
Iterating all modules and re-patching every time the settings change
is not implemented.
Based on lwsync patching.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/setup.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h index afc7280cce3b..a24c3c9053cc 100644 --- a/arch/powerpc/include/asm/setup.h +++ b/arch/powerpc/include/asm/setup.h @@ -53,6 +53,13 @@ enum l1d_flush_type { void setup_rfi_flush(enum l1d_flush_type, bool enable); void do_rfi_flush_fixups(enum l1d_flush_type types); void do_barrier_nospec_fixups(bool enable); +extern bool barrier_nospec_enabled; + +#ifdef CONFIG_PPC_BOOK3S_64 +void do_barrier_nospec_fixups_range(bool enable, void *start, void *end); +#else +static inline void do_barrier_nospec_fixups_range(bool enable, void *start, void *end) { }; +#endif #endif /* !__ASSEMBLY__ */ |