diff mbox series

[v2,4/9] xive/p9: use predefined bitmasks to manipulate EQ addresses

Message ID 20191111054448.6989-5-npiggin@gmail.com
State Accepted
Headers show
Series misc fixes and cleanups | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (d75e82dbfbb9443efeb3f9a5921ac23605aab469)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Nicholas Piggin Nov. 11, 2019, 5:44 a.m. UTC
This catches one more case missed by commit 2354857fca.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 hw/xive.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/hw/xive.c b/hw/xive.c
index bf2983306..324b8d052 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -802,8 +802,9 @@  static void xive_init_emu_eq(uint32_t vp_blk, uint32_t vp_idx,
 	memset(eq, 0, sizeof(struct xive_eq));
 
 	eq->w1 = EQ_W1_GENERATION;
-	eq->w3 = ((uint64_t)backing_page) & 0xffffffff;
-	eq->w2 = (((uint64_t)backing_page)) >> 32 & 0x0fffffff;
+	eq->w3 = ((uint64_t)backing_page) & EQ_W3_OP_DESC_LO;
+	eq->w2 = (((uint64_t)backing_page) >> 32) & EQ_W2_OP_DESC_HI;
+
 	eq->w6 = SETFIELD(EQ_W6_NVT_BLOCK, 0ul, vp_blk) |
 		SETFIELD(EQ_W6_NVT_INDEX, 0ul, vp_idx);
 	eq->w7 = SETFIELD(EQ_W7_F0_PRIORITY, 0ul, prio);