diff mbox series

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

Message ID 20210804072137.1147875-44-hegdevasant@linux.vnet.ibm.com
State Accepted
Headers show
Series P10 Enablement | expand

Commit Message

Vasant Hegde Aug. 4, 2021, 7:21 a.m. UTC
From: Cédric Le Goater <clg@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@kaod.org>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 hw/xive2.c         | 2 +-
 include/opal-api.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

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 */