diff options
author | Andy Lutomirski <luto@mit.edu> | 2011-08-25 16:10:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-25 16:27:14 -0400 |
commit | b4ca46e4e82a0a5976fe5eab85be585d75f8202f (patch) | |
tree | 3c10c751f3946b11559b44051d7a889965770fcf /arch/x86 | |
parent | cbbfa38fcb95930babc5233cf6927ec430f38abc (diff) |
x86-32: Fix boot with CONFIG_X86_INVD_BUG
entry_32.S contained a hardcoded alternative instruction entry, and the
format changed in commit 59e97e4d6fbc ("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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/entry_32.S | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 5c1a91974918..f3f6f5344001 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <asm/ftrace.h> | 54 | #include <asm/ftrace.h> |
55 | #include <asm/irq_vectors.h> | 55 | #include <asm/irq_vectors.h> |
56 | #include <asm/cpufeature.h> | 56 | #include <asm/cpufeature.h> |
57 | #include <asm/alternative-asm.h> | ||
57 | 58 | ||
58 | /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */ | 59 | /* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */ |
59 | #include <linux/elf-em.h> | 60 | #include <linux/elf-em.h> |
@@ -873,12 +874,7 @@ ENTRY(simd_coprocessor_error) | |||
873 | 661: pushl_cfi $do_general_protection | 874 | 661: pushl_cfi $do_general_protection |
874 | 662: | 875 | 662: |
875 | .section .altinstructions,"a" | 876 | .section .altinstructions,"a" |
876 | .balign 4 | 877 | altinstruction_entry 661b, 663f, X86_FEATURE_XMM, 662b-661b, 664f-663f |
877 | .long 661b | ||
878 | .long 663f | ||
879 | .word X86_FEATURE_XMM | ||
880 | .byte 662b-661b | ||
881 | .byte 664f-663f | ||
882 | .previous | 878 | .previous |
883 | .section .altinstr_replacement,"ax" | 879 | .section .altinstr_replacement,"ax" |
884 | 663: pushl $do_simd_coprocessor_error | 880 | 663: pushl $do_simd_coprocessor_error |