xen/arm64: livepatch: Fix build after 03957f58db
authorJulien Grall <julien.grall@arm.com>
Tue, 21 May 2019 14:24:55 +0000 (15:24 +0100)
committerJulien Grall <julien.grall@arm.com>
Tue, 21 May 2019 14:32:34 +0000 (15:32 +0100)
Commit 03957f58db "xen/const: Extend the existing macro BIT to take a
suffix in parameter" didn't convert all the callers of the macro BIT.

This will result to a build breakage when enabling Livepatch on arm64.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/arm/arm64/livepatch.c

index 2247b925a05fcb9fd29b55e5a37d52a31177f964..5c757792846b0233cf9c250192f3623678514953 100644 (file)
@@ -208,7 +208,7 @@ static int reloc_insn_imm(enum aarch64_reloc_op op, void *dest, u64 val,
     sval >>= lsb;
 
     /* Extract the value bits and shift them to bit 0. */
-    imm_mask = (BIT(lsb + len) - 1) >> lsb;
+    imm_mask = (BIT(lsb + len, UL) - 1) >> lsb;
     imm = sval & imm_mask;
 
     /* Update the instruction's immediate field. */