]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/gic-v3: Fix GIC_LINE_NR accessor
authorZenghui Yu <yuzenghui@huawei.com>
Wed, 18 Sep 2019 06:57:30 +0000 (06:57 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 18 Sep 2019 10:42:23 +0000 (11:42 +0100)
commit6d1f7672cccd42768fe994d467f4f7c93ad2a0b0
treea9f011174cd6864a2338ac13a9ff671bbac52394
parent26e885dd07eeb01a47062f3d7e49cdae7e3ec20e
irqchip/gic-v3: Fix GIC_LINE_NR accessor

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@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1568789850-14080-1-git-send-email-yuzenghui@huawei.com
drivers/irqchip/irq-gic-v3.c