On 24/02/2026 2:17 pm, Andrew Cooper wrote: > On 24/02/2026 2:14 pm, Orzel, Michal wrote: >> On 24/02/2026 13:45, Andrew Cooper wrote: >>> Now that the type handling is entirely uniform, it's easier to see that >>> __declare_arg_3() can use __declare_arg_2() and so on, just like the larger >>> __declare_arg_$()'s already do. >>> >>> No functional change. >> This patch won't build. >> >>> Signed-off-by: Andrew Cooper <[email protected]> >>> --- >>> CC: Stefano Stabellini <[email protected]> >>> CC: Julien Grall <[email protected]> >>> CC: Volodymyr Babchuk <[email protected]> >>> CC: Bertrand Marquis <[email protected]> >>> CC: Michal Orzel <[email protected]> >>> --- >>> xen/arch/arm/include/asm/smccc.h | 15 +++------------ >>> 1 file changed, 3 insertions(+), 12 deletions(-) >>> >>> diff --git a/xen/arch/arm/include/asm/smccc.h >>> b/xen/arch/arm/include/asm/smccc.h >>> index 5b30dd57b69d..347c4526d12a 100644 >>> --- a/xen/arch/arm/include/asm/smccc.h >>> +++ b/xen/arch/arm/include/asm/smccc.h >>> @@ -114,26 +114,17 @@ struct arm_smccc_res { >>> >>> #define __declare_arg_1(a0, a1, res) \ >>> typeof(a1) __a1 = (a1); \ >>> - struct arm_smccc_res *___res = (res); \ >>> - register unsigned long arg0 ASM_REG(0) = (uint32_t)(a0);\ >>> + __declare_arg_0(a0, res); \ >>> register typeof(a1) arg1 ASM_REG(1) = __a1 >>> >>> #define __declare_arg_2(a0, a1, a2, res) \ >>> typeof(a1) __a1 = (a1); \ >> You should remove this line and ... >> >>> - typeof(a2) __a2 = (a2); \ >> keep this line. >> >>> - struct arm_smccc_res *___res = (res); \ >>> - register unsigned long arg0 ASM_REG(0) = (uint32_t)(a0);\ >>> - register typeof(a1) arg1 ASM_REG(1) = __a1; \ >>> + __declare_arg_1(a0, a1, res); \ >>> register typeof(a2) arg2 ASM_REG(2) = __a2 >>> >>> #define __declare_arg_3(a0, a1, a2, a3, res) \ >>> typeof(a1) __a1 = (a1); \ >>> - typeof(a2) __a2 = (a2); \ >> Same here. > Hmm - it built for me. I'd better figure out why I missed it first.
Ah - a last minute refactor, and I didn't build test on this commit boundary. Fixed. Thanks. ~Andrew
