diff mbox series

adu: Avoid address truncation from 64-bit to 32-bit

Message ID 20180921071843.3044578-1-amitay@ozlabs.org
State Accepted
Headers show
Series adu: Avoid address truncation from 64-bit to 32-bit | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied
snowpatch_ozlabs/build-multiarch fail Test build-multiarch on branch master

Commit Message

Amitay Isaacs Sept. 21, 2018, 7:18 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/adu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libpdbg/adu.c b/libpdbg/adu.c
index 27049b7..e956b71 100644
--- a/libpdbg/adu.c
+++ b/libpdbg/adu.c
@@ -368,7 +368,7 @@  retry:
 	CHECK_ERR(adu_reset(adu));
 
 	/* Set the address */
-	ctrl_reg = SETFIELD(P9_FBC_ALTD_ADDRESS, 0, addr);
+	ctrl_reg = SETFIELD(P9_FBC_ALTD_ADDRESS, 0ULL, addr);
 	CHECK_ERR(pib_write(&adu->target, P9_ALTD_CONTROL_REG, ctrl_reg));
 
 	/* Start the command */
@@ -420,7 +420,7 @@  static int p9_adu_putmem(struct adu *adu, uint64_t addr, uint64_t data, int size
 	CHECK_ERR(adu_reset(adu));
 
 	/* Set the address */
-	ctrl_reg = SETFIELD(P9_FBC_ALTD_ADDRESS, 0, addr);
+	ctrl_reg = SETFIELD(P9_FBC_ALTD_ADDRESS, 0ULL, addr);
 retry:
 	CHECK_ERR(pib_write(&adu->target, P9_ALTD_CONTROL_REG, ctrl_reg));