[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220510133036.46767-2-mheyne@amazon.de>
Date: Tue, 10 May 2022 13:30:30 +0000
From: Maximilian Heyne <mheyne@...zon.de>
To: unlisted-recipients:; (no To-header on input)
CC: Masami Hiramatsu <mhiramat@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Juergen Gross <jgross@...e.com>, <x86@...nel.org>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Ingo Molnar <mingo@...nel.org>,
Stefano Stabellini <sstabellini@...nel.org>,
Andrew Cooper <andrew.cooper3@...rix.com>,
Borislav Petkov <bp@...en8.de>,
<xen-devel@...ts.xenproject.org>,
Randy Dunlap <rdunlap@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Maximilian Heyne <mheyne@...zon.de>, <stable@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Radim Krčmář <rkrcmar@...hat.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Sasha Levin <sashal@...nel.org>,
<linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>
Subject: [PATCH 1/4] x86/asm: Allow to pass macros to __ASM_FORM()
From: Masami Hiramatsu <mhiramat@...nel.org>
commit f7919fd943abf0c77aed4441ea9897a323d132f5 upstream
Use __stringify() at __ASM_FORM() so that user can pass
code including macros to __ASM_FORM().
Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Juergen Gross <jgross@...e.com>
Cc: x86@...nel.org
Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Stefano Stabellini <sstabellini@...nel.org>
Cc: Andrew Cooper <andrew.cooper3@...rix.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: xen-devel@...ts.xenproject.org
Cc: Randy Dunlap <rdunlap@...radead.org>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Link: https://lkml.kernel.org/r/156777562873.25081.2288083344657460959.stgit@devnote2
Signed-off-by: Maximilian Heyne <mheyne@...zon.de>
Cc: stable@...r.kernel.org # 5.4.x
---
arch/x86/include/asm/asm.h | 8 +++++---
1 file 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__
--
2.32.0
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
Powered by blists - more mailing lists