[Skiboot] [PATCH 12/21] xive: Don't try to EOI a masked source

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon Nov 14 13:06:12 AEDT 2016


It will just generate spurious powerbus traffic and ESB state
changes.

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

diff --git a/hw/xive.c b/hw/xive.c
index 33c8fe2..69b5738 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -1563,9 +1563,21 @@ static void xive_source_eoi(struct irq_source *is, uint32_t isn)
 {
 	struct xive_src *s = container_of(is, struct xive_src, is);
 	uint32_t idx = isn - s->esb_base;
+	struct xive_ive *ive;
 	void *mmio_base;
 	uint64_t eoi_val;
 
+	/* Grab the IVE */
+	ive = s->xive->ivt_base;
+	if (!ive)
+		return;
+	ive += 	GIRQ_TO_IDX(isn);
+
+	/* If it's invalid or masked, don't do anything */
+	if ((ive->w & IVE_MASKED) || !(ive->w & IVE_VALID))
+		return;
+
+	/* Grab MMIO control address for that ESB */
 	mmio_base = s->esb_mmio + (1ull << s->esb_shift) * idx;
 
 	/* If the XIVE supports the new "store EOI facility, use it */
-- 
2.7.4



More information about the Skiboot mailing list