Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <mhiramat@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Juergen Gross <jgross@suse.com>
Cc: x86@kernel.org
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: xen-devel@lists.xenproject.org
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lkml.kernel.org/r/156777562873.25081.2288083344657460959.stgit@devnote2

authored by

Masami Hiramatsu and committed by
Peter Zijlstra
f7919fd9 4f5cafb5

+5 -3
+5 -3
arch/x86/include/asm/asm.h
··· 7 7 # define __ASM_FORM_RAW(x) x 8 8 # define __ASM_FORM_COMMA(x) x, 9 9 #else 10 - # define __ASM_FORM(x) " " #x " " 11 - # define __ASM_FORM_RAW(x) #x 12 - # define __ASM_FORM_COMMA(x) " " #x "," 10 + #include <linux/stringify.h> 11 + 12 + # define __ASM_FORM(x) " " __stringify(x) " " 13 + # define __ASM_FORM_RAW(x) __stringify(x) 14 + # define __ASM_FORM_COMMA(x) " " __stringify(x) "," 13 15 #endif 14 16 15 17 #ifndef __x86_64__