diff options
Diffstat (limited to 'arch/x86/include/asm/alternative.h')
| -rw-r--r-- | arch/x86/include/asm/alternative.h | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index 03b6bb5394a0..bc6abb7bc7ee 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -45,10 +45,9 @@  struct alt_instr {  	u8 *instr;		/* original instruction */  	u8 *replacement; -	u8  cpuid;		/* cpuid bit set for replacement */ +	u16 cpuid;		/* cpuid bit set for replacement */  	u8  instrlen;		/* length of original instruction */  	u8  replacementlen;	/* length of new instruction, <= instrlen */ -	u8  pad1;  #ifdef CONFIG_X86_64  	u32 pad2;  #endif @@ -86,9 +85,11 @@ static inline int alternatives_text_reserved(void *start, void *end)        _ASM_ALIGN "\n"							\        _ASM_PTR "661b\n"				/* label           */	\        _ASM_PTR "663f\n"				/* new instruction */	\ -      "	 .byte " __stringify(feature) "\n"	/* feature bit     */	\ +      "	 .word " __stringify(feature) "\n"	/* feature bit     */	\        "	 .byte 662b-661b\n"			/* sourcelen       */	\        "	 .byte 664f-663f\n"			/* replacementlen  */	\ +      ".previous\n"							\ +      ".section .discard,\"aw\",@progbits\n"				\        "	 .byte 0xff + (664f-663f) - (662b-661b)\n" /* rlen <= slen */	\        ".previous\n"							\        ".section .altinstr_replacement, \"ax\"\n"			\ | 
