[Skiboot] [PATCH] interrupts: Declare xive2 DT node as an interrupt-controller

Cédric Le Goater clg at kaod.org
Wed Oct 20 22:02:31 AEDT 2021


On 10/20/21 12:28, Frederic Barrat wrote:
> This patch fixes errors seen when linux looks for the interrupt to use
> for a device LSI:
> 
>       pci X:Y:Z of_irq_parse_pci: failed with rc=-22
> 
> The of/irq parsing code requires those new properties to be able to
> map the interrupt specifier correctly. It was not needed before
> comitting cd12ea6d8e1 ("interrupts: Do not advertise XICS support on
> P10"), because the LSI mapping code was defaulting to the XICS
> interrupt controller node, which is now removed (and had those
> properties).

Thanks for digging that up.
  
> Fixes: cd12ea6d8e1 ("interrupts: Do not advertise XICS support on P10")
> Signed-off-by: Frederic Barrat <fbarrat at linux.ibm.com>

I would prefer the title to have a "xive/p10:" prefix but anyhow :

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


> ---
>   hw/xive2.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/xive2.c b/hw/xive2.c
> index 0254175a..30293cdf 100644
> --- a/hw/xive2.c
> +++ b/hw/xive2.c
> @@ -1955,7 +1955,12 @@ static void xive_create_mmio_dt_node(struct xive *x)
>   			     tb + 3 * stride, stride);
>   
>   	dt_add_property_strings(xive_dt_node, "compatible",
> -				"ibm,opal-xive-pe", "ibm,opal-intc");
> +				"ibm,opal-xive-pe", "ibm,opal-xive-vc",
> +				"ibm,opal-intc");
> +
> +	dt_add_property(xive_dt_node, "interrupt-controller", NULL, 0);
> +	dt_add_property_cells(xive_dt_node, "#address-cells", 0);
> +	dt_add_property_cells(xive_dt_node, "#interrupt-cells", 2);
>   
>   	dt_add_property_cells(xive_dt_node, "ibm,xive-eq-sizes",
>   			      12, 16, 21, 24);
> 


As a follow up, it would be nice to fix the XICS interrupt controller
which is declared as a "ibm,opal-xive-vc" on P9 and P8.

This looks like a lets-make-linux-happy hack. See add_ics_node().

Thanks,

C.


More information about the Skiboot mailing list