]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
xen/arm: cpregs: Allow HSR_CPREG* to receive more than 1 parameter
authorJulien Grall <julien.grall@arm.com>
Mon, 16 Jul 2018 17:26:58 +0000 (18:26 +0100)
committerJulien Grall <julien.grall@arm.com>
Wed, 22 Aug 2018 15:30:20 +0000 (16:30 +0100)
At the moment, HSR_CPREG is expected to receive only the co-processor
register name in parameter. Because the name is actually a define, this
may have been expanded by a previous macro.

Rather than imposing the use of _HSR_CPREG* in such cases, allow
HSR_CPREG to receive more than 1 parameter.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/include/asm-arm/cpregs.h

index 8db65d5e2a5c53170fb68657393bbee92c1ed535..4c74e8161b12671ccc75db0f56cfa3b95cc6ddbc 100644 (file)
@@ -47,8 +47,8 @@
     ((__HSR_CPREG_##op1) << HSR_CP64_OP1_SHIFT)
 
 /* Encode a register as per HSR ISS pattern */
-#define HSR_CPREG32(X) _HSR_CPREG32(X)
-#define HSR_CPREG64(X) _HSR_CPREG64(X)
+#define HSR_CPREG32(X...) _HSR_CPREG32(X)
+#define HSR_CPREG64(X...) _HSR_CPREG64(X)
 
 /*
  * Order registers by Coprocessor-> CRn-> Opcode 1-> CRm-> Opcode 2