[Skiboot] [PATCH v2 4/9] xive/p9: use predefined bitmasks to manipulate EQ addresses
Nicholas Piggin
npiggin at gmail.com
Mon Nov 11 16:44:43 AEDT 2019
This catches one more case missed by commit 2354857fca.
Reviewed-by: Cédric Le Goater <clg at kaod.org>
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
hw/xive.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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);
--
2.23.0
More information about the Skiboot
mailing list