Revert "x86/alternatives: Macrofy lock prefixes to work around GCC inlining bugs"
This reverts commit77f48ec28e
. See this commit for details about the revert:e769742d35
("Revert "x86/jump-labels: Macrofy inline assembly code to work around GCC inlining bugs"") Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Borislav Petkov <bp@alien8.de> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Cc: Juergen Gross <jgross@suse.com> Cc: Richard Biener <rguenther@suse.de> Cc: Kees Cook <keescook@chromium.org> Cc: Segher Boessenkool <segher@kernel.crashing.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Nadav Amit <namit@vmware.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Родитель
ffb61c6346
Коммит
851a4cd7cc
|
@ -7,24 +7,16 @@
|
||||||
#include <asm/asm.h>
|
#include <asm/asm.h>
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
.macro LOCK_PREFIX_HERE
|
.macro LOCK_PREFIX
|
||||||
|
672: lock
|
||||||
.pushsection .smp_locks,"a"
|
.pushsection .smp_locks,"a"
|
||||||
.balign 4
|
.balign 4
|
||||||
.long 671f - . # offset
|
.long 672b - .
|
||||||
.popsection
|
.popsection
|
||||||
671:
|
.endm
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro LOCK_PREFIX insn:vararg
|
|
||||||
LOCK_PREFIX_HERE
|
|
||||||
lock \insn
|
|
||||||
.endm
|
|
||||||
#else
|
#else
|
||||||
.macro LOCK_PREFIX_HERE
|
.macro LOCK_PREFIX
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro LOCK_PREFIX insn:vararg
|
|
||||||
.endm
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -31,8 +31,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
#define LOCK_PREFIX_HERE "LOCK_PREFIX_HERE\n\t"
|
#define LOCK_PREFIX_HERE \
|
||||||
#define LOCK_PREFIX "LOCK_PREFIX "
|
".pushsection .smp_locks,\"a\"\n" \
|
||||||
|
".balign 4\n" \
|
||||||
|
".long 671f - .\n" /* offset */ \
|
||||||
|
".popsection\n" \
|
||||||
|
"671:"
|
||||||
|
|
||||||
|
#define LOCK_PREFIX LOCK_PREFIX_HERE "\n\tlock; "
|
||||||
|
|
||||||
#else /* ! CONFIG_SMP */
|
#else /* ! CONFIG_SMP */
|
||||||
#define LOCK_PREFIX_HERE ""
|
#define LOCK_PREFIX_HERE ""
|
||||||
#define LOCK_PREFIX ""
|
#define LOCK_PREFIX ""
|
||||||
|
|
|
@ -8,4 +8,3 @@
|
||||||
|
|
||||||
#include <linux/compiler.h>
|
#include <linux/compiler.h>
|
||||||
#include <asm/refcount.h>
|
#include <asm/refcount.h>
|
||||||
#include <asm/alternative-asm.h>
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче