aboutsummaryrefslogtreecommitdiff
path: root/hw/xive.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2020-06-12 13:37:24 +0200
committerOliver O'Halloran <oohall@gmail.com>2020-06-30 11:47:38 +1000
commitbd70a097a4a98af27820bcc1b7b7c7388e88ebed (patch)
tree15a344ab3b8f949012d87633d32a7efb19ea46f8 /hw/xive.c
parent2476b5b5ebf5d664b8c260eeaae80b6a32174218 (diff)
downloadskiboot-bd70a097a4a98af27820bcc1b7b7c7388e88ebed.zip
skiboot-bd70a097a4a98af27820bcc1b7b7c7388e88ebed.tar.gz
skiboot-bd70a097a4a98af27820bcc1b7b7c7388e88ebed.tar.bz2
xive/p9: Introduce XIVE_ESB_SHIFT
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@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hw/xive.c')
-rw-r--r--hw/xive.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/xive.c b/hw/xive.c
index 8155e25..5b96837 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 */