]> Git Repo - linux.git/commitdiff
irqchip/sifive-plic: Skip contexts except supervisor in plic_init()
authorAlan Mikhak <[email protected]>
Thu, 24 Oct 2019 16:11:43 +0000 (09:11 -0700)
committerMarc Zyngier <[email protected]>
Fri, 25 Oct 2019 10:48:13 +0000 (11:48 +0100)
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]
drivers/irqchip/irq-sifive-plic.c

index 3e51deedbcc8f86132fe1d0917c72567b3ef8d63..b1a33f97db03b408264ba119c1804f721e22315e 100644 (file)
@@ -251,8 +251,8 @@ static int __init plic_init(struct device_node *node,
                        continue;
                }
 
-               /* skip context holes */
-               if (parent.args[0] == -1)
+               /* skip contexts other than supervisor external interrupt */
+               if (parent.args[0] != IRQ_S_EXT)
                        continue;
 
                hartid = plic_find_hart_id(parent.np);
This page took 0.080165 seconds and 4 git commands to generate.