irqchip/sifive-plic: Fix chip_data access within a hierarchy
authorGreentime Hu <greentime.hu@sifive.com>
Thu, 29 Oct 2020 02:37:38 +0000 (10:37 +0800)
committerMarc Zyngier <maz@kernel.org>
Sun, 1 Nov 2020 11:52:27 +0000 (11:52 +0000)
commitf9ac7bbd6e4540dcc6df621b9c9b6eb2e26ded1d
treeb8c3b8da8ec244e06616053d8df77ef986b219f0
parenta7480c5d725c4ecfc627e70960f249c34f5d13e8
irqchip/sifive-plic: Fix chip_data access within a hierarchy

The plic driver crashes in plic_irq_unmask() when the interrupt is within a
hierarchy, as it picks the top-level chip_data instead of its local one.

Using irq_data_get_irq_chip_data() instead of irq_get_chip_data() solves
the issue for good.

Fixes: f1ad1133b18f ("irqchip/sifive-plic: Add support for multiple PLICs")
Signed-off-by: Greentime Hu <greentime.hu@sifive.com>
[maz: rewrote commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Link: https://lore.kernel.org/r/20201029023738.127472-1-greentime.hu@sifive.com
drivers/irqchip/irq-sifive-plic.c