diff mbox series

[v3,05/13] xive: Make assertion in xive_eq_for_target() more informative

Message ID 20170910073535.27226-5-benh@kernel.crashing.org
State Superseded
Headers show
Series [v3,01/13] xive: Remove useless memory barriers in VP/EQ inits | expand

Commit Message

Benjamin Herrenschmidt Sept. 10, 2017, 7:35 a.m. UTC
If this fails, print a bit more info about it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 hw/xive.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/xive.c b/hw/xive.c
index 71280002..4f08e655 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -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;