[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] x86: move quoting of __ASM_{STAC, CLAC}
commit 645a2ff8187eb3c77490ce8206f5254b0bdfbabf Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Wed Aug 29 16:31:32 2018 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Aug 29 16:31:32 2018 +0200 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 <jbeulich@xxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/include/asm-x86/asm_defns.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) 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" -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |