Skip to content

Commit 41860cc

Browse files
alanmikhak-at-sifiveMarc Zyngier
authored andcommitted
irqchip/sifive-plic: Skip contexts except supervisor in plic_init()
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 <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Acked-by: Paul Walmsley <[email protected]> # arch/riscv Link: https://lkml.kernel.org/r/[email protected]
1 parent 8424312 commit 41860cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/irqchip/irq-sifive-plic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ static int __init plic_init(struct device_node *node,
251251
continue;
252252
}
253253

254-
/* skip context holes */
255-
if (parent.args[0] == -1)
254+
/* skip contexts other than supervisor external interrupt */
255+
if (parent.args[0] != IRQ_S_EXT)
256256
continue;
257257

258258
hartid = plic_find_hart_id(parent.np);

0 commit comments

Comments
 (0)