pnv/xive2: Define OGEN field in the TIMA
authorFrederic Barrat <fbarrat@linux.ibm.com>
Fri, 13 Sep 2024 16:16:47 +0000 (11:16 -0500)
committerNicholas Piggin <npiggin@gmail.com>
Sun, 3 Nov 2024 23:14:21 +0000 (09:14 +1000)
The OGEN field at offset 0x1F is a new field for Gen2 TIMA. This
patch defines it.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Michael Kowal <kowal@linux.vnet.ibm.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
hw/intc/xive.c
include/hw/ppc/xive_regs.h

index dc86a7a3be2223241b65b38ba128a7afdec9ea33..0e81678ab363a53768691175acda61bad7be7513 100644 (file)
@@ -742,6 +742,10 @@ void xive_tctx_reset(XiveTCTX *tctx)
     tctx->regs[TM_QW1_OS + TM_LSMFB] = 0xFF;
     tctx->regs[TM_QW1_OS + TM_ACK_CNT] = 0xFF;
     tctx->regs[TM_QW1_OS + TM_AGE] = 0xFF;
+    if (!(xive_presenter_get_config(tctx->xptr) &
+          XIVE_PRESENTER_GEN1_TIMA_OS)) {
+        tctx->regs[TM_QW1_OS + TM_OGEN] = 2;
+    }
 
     /*
      * Initialize PIPR to 0xFF to avoid phantom interrupts when the
index 9d52d464d97acd61629d38317b0a64fb57c6bee7..9062c6abf65bcd234173a98a4307f77accd20508 100644 (file)
@@ -79,6 +79,7 @@
 #define TM_INC                  0x5  /*  -   +   -   +  */
 #define TM_AGE                  0x6  /*  -   +   -   +  */
 #define TM_PIPR                 0x7  /*  -   +   -   +  */
+#define TM_OGEN                 0xF  /*  -   +   -   -  */ /* P10 only */
 
 #define TM_WORD0                0x0
 #define TM_WORD1                0x4