[Skiboot] [PATCH 55/60] xive: Don't try to find a target EQ for prio 0xff

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Dec 22 14:17:03 AEDT 2016


Otherwise we get warnings when masking interrupts

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 hw/xive.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/hw/xive.c b/hw/xive.c
index 89201d9..acfcea4 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -2229,21 +2229,23 @@ static int64_t xive_set_irq_targetting(uint32_t isn, uint32_t target,
 			bitmap_set_bit(*x->int_enabled_map, GIRQ_TO_IDX(isn));
 	}
 
-	/* Re-target the IVE. First find the EQ
+	/* If prio isn't 0xff, re-target the IVE. First find the EQ
 	 * correponding to the target
 	 */
-	if (!xive_eq_for_target(target, prio, &eq_blk, &eq_idx)) {
-		xive_err(x, "Can't find EQ for target/prio 0x%x/%d\n",
-			 target, prio);
-		unlock(&x->lock);
-		return OPAL_PARAMETER;
-	}
+	if (prio != 0xff) {
+		if (!xive_eq_for_target(target, prio, &eq_blk, &eq_idx)) {
+			xive_err(x, "Can't find EQ for target/prio 0x%x/%d\n",
+				 target, prio);
+			unlock(&x->lock);
+			return OPAL_PARAMETER;
+		}
 
-	/* Try to update it atomically to avoid an intermediary
-	 * stale state
-	 */
-	new_ive = SETFIELD(IVE_EQ_BLOCK, new_ive, eq_blk);
-	new_ive = SETFIELD(IVE_EQ_INDEX, new_ive, eq_idx);
+		/* Try to update it atomically to avoid an intermediary
+		 * stale state
+		 */
+		new_ive = SETFIELD(IVE_EQ_BLOCK, new_ive, eq_blk);
+		new_ive = SETFIELD(IVE_EQ_INDEX, new_ive, eq_idx);
+	}
 	new_ive = SETFIELD(IVE_EQ_DATA, new_ive, lirq);
 
 	xive_vdbg(x,"ISN %x routed to eq %x/%x lirq=%08x IVE=%016llx !\n",
-- 
2.9.3



More information about the Skiboot mailing list