Skip to content

Commit b4ca46e

Browse files
amlutotorvalds
authored andcommitted
x86-32: Fix boot with CONFIG_X86_INVD_BUG
entry_32.S contained a hardcoded alternative instruction entry, and the format changed in commit 59e97e4 ("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: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Andy Lutomirski <luto@mit.edu> Cc: Peter Anvin <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent cbbfa38 commit b4ca46e

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎arch/x86/kernel/entry_32.S‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
#include <asm/ftrace.h>
5555
#include <asm/irq_vectors.h>
5656
#include <asm/cpufeature.h>
57+
#include <asm/alternative-asm.h>
5758

5859
/* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
5960
#include <linux/elf-em.h>
@@ -873,12 +874,7 @@ ENTRY(simd_coprocessor_error)
873874
661: pushl_cfi $do_general_protection
874875
662:
875876
.section .altinstructions,"a"
876-
.balign 4
877-
.long 661b
878-
.long 663f
879-
.word X86_FEATURE_XMM
880-
.byte 662b-661b
881-
.byte 664f-663f
877+
altinstruction_entry 661b, 663f, X86_FEATURE_XMM, 662b-661b, 664f-663f
882878
.previous
883879
.section .altinstr_replacement,"ax"
884880
663: pushl $do_simd_coprocessor_error

0 commit comments

Comments
 (0)