[Skiboot] [PATCH v2 43/59] xive/p10: Introduce a new OPAL_XIVE_IRQ_STORE_EOI2 flag

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Wed Aug 4 17:21:21 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 7ece64251..2291e9379 100644
--- a/hw/xive2.c
+++ b/hw/xive2.c
@@ -3040,7 +3040,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