[Skiboot] [PATCH v2 4/5] hw/psi-p9: Follow the external IRQ policy

Cédric Le Goater clg at kaod.org
Thu Sep 5 17:09:46 AEST 2019


On 05/09/2019 05:08, Oliver O'Halloran wrote:
> The P8 PSI support follows the external IRQ policy and the P9 PSI
> doesn't. There are no P9 platforms which define an .external_irq()
> in the platform structure so this should not cause any functional
> changes.
> 
> Linux is smart enough to mask LSIs without a registered handler so
> directing them at the OS should be safe.
> 
> Cc: Cédric Le Goater <clg at kaod.org>
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>

one comment below.

Reviewed-by: Cédric Le Goater <clg at kaod.org>

Thanks,

C.

> ---
>  hw/psi.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/psi.c b/hw/psi.c
> index 6c28eb0447ad..ba05be8403d9 100644
> --- a/hw/psi.c
> +++ b/hw/psi.c
> @@ -629,6 +629,10 @@ static uint64_t psi_p9_irq_attributes(struct irq_source *is __unused,
>  	 if (is_lpc_serirq)
>  		 return lpc_get_irq_policy(psi->chip_id, idx - P9_PSI_IRQ_LPC_SIRQ0);
>  
> +	if (idx == P9_PSI_IRQ_EXTERNAL)
> +		if (psi_ext_irq_policy == EXTERNAL_IRQ_POLICY_LINUX)

I would remove the test as this is always true. Less noise in the code.


> +			return IRQ_ATTR_TARGET_LINUX | IRQ_ATTR_TYPE_LSI;
> +
>  	return IRQ_ATTR_TARGET_OPAL | IRQ_ATTR_TYPE_LSI;
>  }
>  
> 



More information about the Skiboot mailing list