Re: [PATCH] irqchip/gic-v3: Fix GIC_LINE_NR accessor

From: Marc Zyngier
Date: Wed Sep 18 2019 - 06:23:18 EST


On 18/09/2019 07:57, Zenghui Yu wrote:
> As per GIC spec, ITLinesNumber indicates the maximum SPI INTID that
> the GIC implementation supports. And the maximum SPI INTID an
> implementation might support is 1019 (field value 11111).
>
> max(GICD_TYPER_SPIS(...), 1020) is not what we actually want for
> GIC_LINE_NR. Fix it to min(GICD_TYPER_SPIS(...), 1020).
>
> Signed-off-by: Zenghui Yu <yuzenghui@xxxxxxxxxx>
> ---
>
> Hi Marc,
>
> I still see "GICv3: 992 SPIs implemented" on the host. I go back to
> https://patchwork.kernel.org/patch/11078623/ and it seems that we
> failed to make the GIC_LINE_NR correct at that time.

Ah, nice catch. Clearly, I didn't have my head screwed on properly when
I wrote this. I'll take this in for the next round of fixes.

Thanks,

M.
--
Jazz is not dead, it just smells funny...