]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
irqchip/sifive-plic: Skip contexts except supervisor in plic_init()
authorAlan Mikhak <alan.mikhak@sifive.com>
Thu, 24 Oct 2019 16:11:43 +0000 (09:11 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 17:47:35 +0000 (18:47 +0100)
commit54fab6508dd151c1560799054febfda20527d020
tree7a294580232fd95db22982b32e5a184b468c540f
parent3170ecce06a307c6e40eabec5d6dee0e27ec586c
irqchip/sifive-plic: Skip contexts except supervisor in plic_init()

BugLink: https://bugs.launchpad.net/bugs/1852111
[ Upstream commit 41860cc447045c811ce6d5a92f93a065a691fe8e ]

Modify plic_init() to skip .dts interrupt contexts other
than supervisor external interrupt.

The .dts entry for plic may specify multiple interrupt contexts.
For example, it may assign two entries IRQ_M_EXT and IRQ_S_EXT,
in that order, to the same interrupt controller. This patch
modifies plic_init() to skip the IRQ_M_EXT context since
IRQ_S_EXT is currently the only supported context.

If IRQ_M_EXT is not skipped, plic_init() will report "handler
already present for context" when it comes across the IRQ_S_EXT
context in the next iteration of its loop.

Without this patch, .dts would have to be edited to replace the
value of IRQ_M_EXT with -1 for it to be skipped.

Signed-off-by: Alan Mikhak <alan.mikhak@sifive.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Paul Walmsley <paul.walmsley@sifive.com> # arch/riscv
Link: https://lkml.kernel.org/r/1571933503-21504-1-git-send-email-alan.mikhak@sifive.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/irqchip/irq-sifive-plic.c