[Skiboot] [PATCH v2 03/11] xive/p9: Introduce XIVE_ESB_SHIFT
Cédric Le Goater
clg at kaod.org
Fri Jun 12 21:37:24 AEST 2020
Each interrupt source is associated with a pair of ESB pages. The even
page is for trigger and the odd page is for management.
Reviewed-by: Gustavo Romero <gromero at linux.ibm.com>
Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
hw/xive.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/xive.c b/hw/xive.c
index 8155e255660e..5b96837425b5 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -100,7 +100,6 @@
/* Use 64K for everything by default */
#define IC_PAGE_SIZE 0x10000
#define TM_PAGE_SIZE 0x10000
-#define IPI_ESB_SHIFT (16 + 1)
#define EQ_ESB_SHIFT (16 + 1)
/* VC BAR contains set translations for the ESBs and the EQs.
@@ -165,6 +164,9 @@
#define SBE_SIZE (XIVE_INT_COUNT / SBE_PER_BYTE)
#define IVT_SIZE (XIVE_INT_COUNT * sizeof(struct xive_ive))
+/* Use 64K for everything by default */
+#define XIVE_ESB_SHIFT (16 + 1) /* trigger + mgmt pages */
+
/* Max number of EQs. We allocate an indirect table big enough so
* that when fully populated we can have that many EQs.
*
@@ -2559,8 +2561,8 @@ void xive_register_ipi_source(uint32_t base, uint32_t count, void *data,
/* Callbacks assume the MMIO base corresponds to the first
* interrupt of that source structure so adjust it
*/
- mmio_base = x->esb_mmio + (1ul << IPI_ESB_SHIFT) * base_idx;
- __xive_register_source(x, s, base, count, IPI_ESB_SHIFT, mmio_base,
+ mmio_base = x->esb_mmio + (1ul << XIVE_ESB_SHIFT) * base_idx;
+ __xive_register_source(x, s, base, count, XIVE_ESB_SHIFT, mmio_base,
flags, false, data, ops);
}
@@ -2662,7 +2664,7 @@ static struct xive *init_one_xive(struct dt_node *np)
if (XIVE_CAN_STORE_EOI(x))
flags |= XIVE_SRC_STORE_EOI;
__xive_register_source(x, &x->ipis, x->int_base,
- x->int_hw_bot - x->int_base, IPI_ESB_SHIFT,
+ x->int_hw_bot - x->int_base, XIVE_ESB_SHIFT,
x->esb_mmio, flags, true, NULL, NULL);
/* Register escalation sources */
--
2.25.4
More information about the Skiboot
mailing list