From: Jan Beulich Date: Wed, 29 Aug 2018 14:31:32 +0000 (+0200) Subject: x86: move quoting of __ASM_{STAC,CLAC} X-Git-Tag: 4.12.0-rc1~727 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=645a2ff8187eb3c77490ce8206f5254b0bdfbabf;p=people%2Fdwmw2%2Fxen.git x86: move quoting of __ASM_{STAC,CLAC} Both consumers want them quoted, so quote them right away instead of using __stringify() upon use. In the spirit of other recent additions also make the assembly forms assembler macros, allowing the helper #define-s to be #undef-ed subsequently. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- diff --git a/xen/include/asm-x86/asm_defns.h b/xen/include/asm-x86/asm_defns.h index e0096834e6..89a0fb41a2 100644 --- a/xen/include/asm-x86/asm_defns.h +++ b/xen/include/asm-x86/asm_defns.h @@ -189,26 +189,33 @@ void ret_from_intr(void); #endif /* "Raw" instruction opcodes */ -#define __ASM_CLAC .byte 0x0f,0x01,0xca -#define __ASM_STAC .byte 0x0f,0x01,0xcb +#define __ASM_CLAC ".byte 0x0f,0x01,0xca" +#define __ASM_STAC ".byte 0x0f,0x01,0xcb" #ifdef __ASSEMBLY__ -#define ASM_STAC ALTERNATIVE "", __stringify(__ASM_STAC), X86_FEATURE_XEN_SMAP -#define ASM_CLAC ALTERNATIVE "", __stringify(__ASM_CLAC), X86_FEATURE_XEN_SMAP +.macro ASM_STAC + ALTERNATIVE "", __ASM_STAC, X86_FEATURE_XEN_SMAP +.endm +.macro ASM_CLAC + ALTERNATIVE "", __ASM_CLAC, X86_FEATURE_XEN_SMAP +.endm #else static always_inline void clac(void) { /* Note: a barrier is implicit in alternative() */ - alternative("", __stringify(__ASM_CLAC), X86_FEATURE_XEN_SMAP); + alternative("", __ASM_CLAC, X86_FEATURE_XEN_SMAP); } static always_inline void stac(void) { /* Note: a barrier is implicit in alternative() */ - alternative("", __stringify(__ASM_STAC), X86_FEATURE_XEN_SMAP); + alternative("", __ASM_STAC, X86_FEATURE_XEN_SMAP); } #endif +#undef __ASM_STAC +#undef __ASM_CLAC + #ifdef __ASSEMBLY__ .macro SAVE_ALL op, compat=0 .ifeqs "\op", "CLAC"