]> www.infradead.org Git - users/jedix/linux-maple.git/commit
retpoline: move lock/unlock of spec_ctrl_mutex into init_scattered_cpuid_features()
authorChuck Anderson <chuck.anderson@oracle.com>
Mon, 26 Feb 2018 07:58:47 +0000 (23:58 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 3 Mar 2018 01:57:18 +0000 (17:57 -0800)
commit9d7c6d542641c59fbe2cb485468cfd488ee10dcc
tree9043ce44a7fb2c1d1b993e87279d1da1ecfbfba1
parentbc434425cfbba9c961dbe1e102852e5f361ba1a9
retpoline: move lock/unlock of spec_ctrl_mutex into init_scattered_cpuid_features()

init_scattered_cpuid_features() changes spectre mitigation state.
Not all callers obtained spec_ctrl_mutex.  Move the lock/unlock of
spec_ctrl_mutex to init_scattered_cpuid_features() rather than have
the callers obtain it.  That also allows init_scattered_cpuid_features()
to serialize just the spectre state changes instead of the entire
function.

Orabug: 27625404
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
arch/x86/kernel/cpu/microcode/core.c
arch/x86/kernel/cpu/scattered.c