[Skiboot] [PATCH 44/61] xive/p10: Introduce a new OPAL_XIVE_IRQ_STORE_EOI2 flag

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Jul 19 23:19:55 AEST 2021


From: Cédric Le Goater <clg at kaod.org>

StoreEOI (the capability to EOI with a store) requires load-after-store
ordering in some cases to be reliable. P10 introduced a new offset for
load operations to enforce correct ordering and the XIVE driver has
the required support since kernel 5.8, commit b1f9be9392f0.

OPAL on P10 will advertise support of StoreEOI with a new flag.

Signed-off-by: Cédric Le Goater <clg at kaod.org>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hw/xive2.c         | 2 +-
 include/opal-api.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/xive2.c b/hw/xive2.c
index 05cb325bb..cd6a4efe6 100644
--- a/hw/xive2.c
+++ b/hw/xive2.c
@@ -3071,7 +3071,7 @@ static uint64_t xive_convert_irq_flags(uint64_t iflags)
 	uint64_t oflags = 0;
 
 	if (iflags & XIVE_SRC_STORE_EOI)
-		oflags |= OPAL_XIVE_IRQ_STORE_EOI;
+		oflags |= OPAL_XIVE_IRQ_STORE_EOI2;
 
 	/* OPAL_XIVE_IRQ_TRIGGER_PAGE is only meant to be set if
 	 * the interrupt has a *separate* trigger page.
diff --git a/include/opal-api.h b/include/opal-api.h
index d7b301a30..348fda8c6 100644
--- a/include/opal-api.h
+++ b/include/opal-api.h
@@ -1164,6 +1164,7 @@ enum {
 	OPAL_XIVE_IRQ_SHIFT_BUG		= 0x00000008, /* DD1.0 workaround */
 	OPAL_XIVE_IRQ_MASK_VIA_FW	= 0x00000010, /* DD1.0 workaround */
 	OPAL_XIVE_IRQ_EOI_VIA_FW	= 0x00000020, /* DD1.0 workaround */
+	OPAL_XIVE_IRQ_STORE_EOI2	= 0x00000040,
 };
 
 /* Flags for OPAL_XIVE_GET/SET_QUEUE_INFO */
-- 
2.31.1



More information about the Skiboot mailing list