aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasami Hiramatsu <[email protected]>2019-09-06 22:13:48 +0900
committerPeter Zijlstra <[email protected]>2019-10-17 21:31:57 +0200
commitf7919fd943abf0c77aed4441ea9897a323d132f5 (patch)
tree2c314981b21f41bc2a00f7351c7c649fadb13c28
parent4f5cafb5cb8471e54afdc9054d973535614f7675 (diff)
x86/asm: Allow to pass macros to __ASM_FORM()
Use __stringify() at __ASM_FORM() so that user can pass code including macros to __ASM_FORM(). Signed-off-by: Masami Hiramatsu <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Juergen Gross <[email protected]> Cc: [email protected] Cc: Boris Ostrovsky <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Stefano Stabellini <[email protected]> Cc: Andrew Cooper <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: [email protected] Cc: Randy Dunlap <[email protected]> Cc: Josh Poimboeuf <[email protected]> Link: https://lkml.kernel.org/r/156777562873.25081.2288083344657460959.stgit@devnote2
-rw-r--r--arch/x86/include/asm/asm.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h
index 3ff577c0b102..1b563f9167ea 100644
--- a/arch/x86/include/asm/asm.h
+++ b/arch/x86/include/asm/asm.h
@@ -7,9 +7,11 @@
# define __ASM_FORM_RAW(x) x
# define __ASM_FORM_COMMA(x) x,
#else
-# define __ASM_FORM(x) " " #x " "
-# define __ASM_FORM_RAW(x) #x
-# define __ASM_FORM_COMMA(x) " " #x ","
+#include <linux/stringify.h>
+
+# define __ASM_FORM(x) " " __stringify(x) " "
+# define __ASM_FORM_RAW(x) __stringify(x)
+# define __ASM_FORM_COMMA(x) " " __stringify(x) ","
#endif
#ifndef __x86_64__