提交 b4ca46e4 编写于 作者: A Andy Lutomirski 提交者: Linus Torvalds

x86-32: Fix boot with CONFIG_X86_INVD_BUG

entry_32.S contained a hardcoded alternative instruction entry, and the
format changed in commit 59e97e4d ("x86: Make alternative
instruction pointers relative").

Replace the hardcoded entry with the altinstruction_entry macro.  This
fixes the 32-bit boot with CONFIG_X86_INVD_BUG=y.
Reported-and-tested-by: NArnaud Lacombe <lacombar@gmail.com>
Signed-off-by: NAndy Lutomirski <luto@mit.edu>
Cc: Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 cbbfa38f
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#include <asm/ftrace.h> #include <asm/ftrace.h>
#include <asm/irq_vectors.h> #include <asm/irq_vectors.h>
#include <asm/cpufeature.h> #include <asm/cpufeature.h>
#include <asm/alternative-asm.h>
/* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */ /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
#include <linux/elf-em.h> #include <linux/elf-em.h>
...@@ -873,12 +874,7 @@ ENTRY(simd_coprocessor_error) ...@@ -873,12 +874,7 @@ ENTRY(simd_coprocessor_error)
661: pushl_cfi $do_general_protection 661: pushl_cfi $do_general_protection
662: 662:
.section .altinstructions,"a" .section .altinstructions,"a"
.balign 4 altinstruction_entry 661b, 663f, X86_FEATURE_XMM, 662b-661b, 664f-663f
.long 661b
.long 663f
.word X86_FEATURE_XMM
.byte 662b-661b
.byte 664f-663f
.previous .previous
.section .altinstr_replacement,"ax" .section .altinstr_replacement,"ax"
663: pushl $do_simd_coprocessor_error 663: pushl $do_simd_coprocessor_error
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册