Skip to content

Commit

Permalink
xive/p9: use predefined bitmasks to manipulate EQ addresses
Browse files Browse the repository at this point in the history
This catches one more case missed by commit 2354857.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
npiggin authored and oohal committed Nov 11, 2019
1 parent 2501c3f commit 154e4ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hw/xive.c
Expand Up @@ -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);
Expand Down

0 comments on commit 154e4ee

Please sign in to comment.