[Skiboot] [PATCH 03/11] xive/p9: Introduce XIVE_ESB_SHIFT
Gustavo Romero
gromero at linux.vnet.ibm.com
Mon Jun 8 13:31:26 AEST 2020
On 6/4/20 10:21 AM, Cédric Le Goater wrote:
> Each interrupt source is associated with a pair of ESB pages. The even
> page is for trigger and the odd page is for management.
>
> 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 3d016934a96d..9b4ed66f7194 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.
> @@ -163,6 +162,9 @@
> #define SBE_SIZE (XIVE_INT_COUNT / 4)
> #define IVT_SIZE (XIVE_INT_COUNT * 8)
>
> +/* 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.
> *
> @@ -2555,8 +2557,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);
> }
>
> @@ -2658,7 +2660,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 */
>
Nice enhancement.
Reviewed-by: Gustavo Romero <gromero at linux.ibm.com>
Best regards,
Gustavo
More information about the Skiboot
mailing list