xen/arm: Simplify SMCCC handling by reusing __declare_arg_$()

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.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
This commit is contained in:
Andrew Cooper committed 2026-02-25 13:06:55 +00:00
1 parent 474e4f9264
commit cd9cd05b2e
1 file changed
+3 -12
+3 -12
View File
@@ -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); \
typeof(a2) __a2 = (a2); \
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); \
typeof(a3) __a3 = (a3); \
struct arm_smccc_res *___res = (res); \
register unsigned long arg0 ASM_REG(0) = (uint32_t)(a0);\
register typeof(a1) arg1 ASM_REG(1) = __a1; \
register typeof(a2) arg2 ASM_REG(2) = __a2; \
__declare_arg_2(a0, a1, a2, res); \
register typeof(a3) arg3 ASM_REG(3) = __a3
#define __declare_arg_4(a0, a1, a2, a3, a4, res) \
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.