[Skiboot] [PATCH 01/16] psi: Add DT option to disable LPC interrupts

Ananth N Mavinakayanahalli ananth at linux.vnet.ibm.com
Thu Nov 10 20:15:01 AEDT 2016


On Thu, Nov 10, 2016 at 06:34:37PM +1100, Benjamin Herrenschmidt wrote:
> Some sim models have the LPC interrupts stuck asserted on secondary
> chips so we add a device-tree option that makes us set the policy
> for these to "Linux" instead of "OPAL".
> 
> Since they aren't referenced in the device-tree this will de-facto
> prevent them from being enabled
> 
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> ---
>  hw/psi.c      | 21 +++++++++++++++++++++
>  include/psi.h |  1 +
>  2 files changed, 22 insertions(+)
> 
> diff --git a/hw/psi.c b/hw/psi.c
> index 900886a..63a64d0 100644
> --- a/hw/psi.c
> +++ b/hw/psi.c
> @@ -539,6 +539,9 @@ static uint64_t psi_p8_irq_attributes(struct irq_source *is, uint32_t isn)
>  	uint32_t idx = isn - psi->interrupt;
>  	uint64_t attr;
>  
> +	if (psi->no_lpc_irqs && idx == P8_IRQ_PSI_LPC)
> +		return IRQ_ATTR_TARGET_LINUX;
> +
>  	if (idx == P8_IRQ_PSI_EXTERNAL &&
>  	    psi_ext_irq_policy == EXTERNAL_IRQ_POLICY_LINUX)
>  		return IRQ_ATTR_TARGET_LINUX;
> @@ -606,6 +609,21 @@ static void psihb_p9_interrupt(struct irq_source *is, uint32_t isn)
>  static uint64_t psi_p9_irq_attributes(struct irq_source *is __unused,
>  				      uint32_t isn __unused)

Not __unused anymore?

>  {
> +	struct psi *psi = is->data;
> +	unsigned int idx = isn & 0xf;

Ananth



More information about the Skiboot mailing list