x86/speculation: Move firmware_restrict_branch_speculation_*() from C to CPP
authorIngo Molnar <mingo@kernel.org>
Wed, 21 Feb 2018 08:20:37 +0000 (09:20 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 21 Feb 2018 15:54:03 +0000 (16:54 +0100)
commitd72f4e29e6d84b7ec02ae93088aa459ac70e733b
treea4ac9e093f9b31d1e592ea909355df6c6ea0fac7
parentca41b97ed9124fd62323a162de5852f6e28f94b8
x86/speculation: Move firmware_restrict_branch_speculation_*() from C to CPP

firmware_restrict_branch_speculation_*() recently started using
preempt_enable()/disable(), but those are relatively high level
primitives and cause build failures on some 32-bit builds.

Since we want to keep <asm/nospec-branch.h> low level, convert
them to macros to avoid header hell...

Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: arjan.van.de.ven@intel.com
Cc: bp@alien8.de
Cc: dave.hansen@intel.com
Cc: jmattson@google.com
Cc: karahmed@amazon.de
Cc: kvm@vger.kernel.org
Cc: pbonzini@redhat.com
Cc: rkrcmar@redhat.com
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/nospec-branch.h