From 7db8a9a31649d970922e4d78f9c65d9922ba8700 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 21 Nov 2017 20:32:30 +1100 Subject: xive: Don't bother cleaning up disabled EQs in reset Additionally, warn if we find an enabled one that isn't one of the firmware built-in queues. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Stewart Smith --- hw/xive.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'hw/xive.c') diff --git a/hw/xive.c b/hw/xive.c index b48b168..e6b233c 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -4494,10 +4494,15 @@ static void xive_reset_one(struct xive *x) * we will incorrectly free the EQs that are reserved * for the physical CPUs */ - eq0 = *eq; - xive_cleanup_eq(&eq0); - xive_eqc_cache_update(x, x->block_id, - idx, 0, 4, &eq0, false, true); + if (eq->w0 & EQ_W0_VALID) { + if (!(eq->w0 & EQ_W0_FIRMWARE)) + xive_dbg(x, "EQ 0x%x:0x%x is valid at reset: %08x %08x\n", + x->block_id, idx, eq->w0, eq->w1); + eq0 = *eq; + xive_cleanup_eq(&eq0); + xive_eqc_cache_update(x, x->block_id, + idx, 0, 4, &eq0, false, true); + } if (eq->w0 & EQ_W0_FIRMWARE) eq_firmware = true; } -- cgit v1.1