From 22ae6b6cea74f9968b42fadf0f72a6c564aa4b29 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Mon, 6 Jan 2025 16:02:04 -0800 Subject: [PATCH] riscv: ensure arguments to __ASM_STR() are expanded first Right now this does not cause any issues, but I had a local change where missing expansion resulted in compilation errors when reading CSRs. --- arch/riscv/include/arch/riscv.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/riscv/include/arch/riscv.h b/arch/riscv/include/arch/riscv.h index 835dda1a..876e32a5 100644 --- a/arch/riscv/include/arch/riscv.h +++ b/arch/riscv/include/arch/riscv.h @@ -134,7 +134,8 @@ #define RISCV_EXCEPTION_STORE_PAGE_FAULT 15 #ifndef ASSEMBLY -#define __ASM_STR(x) #x +#define ___ASM_STR(x) #x +#define __ASM_STR(x) ___ASM_STR(x) __BEGIN_CDECLS