Skip to contentSkip to conversation

xen/arm64: livepatch: Fix build after 03957f58db

PATCH In review Julien Grall 3 participants 4 messages May 21, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/arm64: livepatch: Fix build after 03957f58db

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.

---
 xen/arch/arm/arm64/livepatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/arm64/livepatch.c +1 -1
index 2247b925a0..5c75779284 100644
@@ -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. */
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Julien Grall

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.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 1/1
#2 lore raw
In reply to Julien Grall
Quoted 7 lines · Julien Grall

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.

Quoted 20 lines
---
 xen/arch/arm/arm64/livepatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/arm64/livepatch.c +1 -1
index 2247b925a0..5c75779284 100644
@@ -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. */
Signature · 1 line
2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
Quoted 10 lines · Stefano Stabellini
Quoted 7 lines · Julien Grall

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.

FIY it was already merged to unblock the build. From my understanding, any ack from the rest is sufficient in that case.

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel