Skip to content

Commit

Permalink
xive: Make assertion in xive_eq_for_target() more informative
Browse files Browse the repository at this point in the history
If this fails, print a bit more info about it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
ozbenh authored and stewartsmith committed Sep 13, 2017
1 parent f02d132 commit 3ef155f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hw/xive.c
Original file line number Diff line number Diff line change
Expand Up @@ -2226,7 +2226,11 @@ static inline bool xive_eq_for_target(uint32_t target, uint8_t prio,
eq_idx = vp->w1 & 0x0fffffff;

/* Currently the EQ block and VP block should be the same */
assert(eq_blk == vp_blk);
if (eq_blk != vp_blk) {
xive_err(x, "eq_blk != vp_blk (%d vs. %d) for target 0x%08x/%d\n",
eq_blk, vp_blk, target, prio);
assert(false);
}

if (out_eq_blk)
*out_eq_blk = eq_blk;
Expand Down

0 comments on commit 3ef155f

Please sign in to comment.