]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:02 +0000 (19:22 +0100)
commita67c6374c2b8e78680ae3f3906cb004690f8020c
treede21e27b97ad0c1b2a6b03e1b25d3f18b3e7c683
parent66b4345edf0d1f3d2762cfe92cc2bb52ee2b8747
irqchip/sifive-plic: Fix chip_data access within a hierarchy

[ Upstream commit f9ac7bbd6e4540dcc6df621b9c9b6eb2e26ded1d ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/irqchip/irq-sifive-plic.c