irqchip: Skip contexts except supervisor in plic_init()
Subsystems (3)
PATCH v2 1/1 irqchip: Skip contexts except supervisor in plic_init()
From: Alan Mikhak <[email protected]>
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.
--- drivers/irqchip/irq-sifive-plic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/irqchip/irq-sifive-plic.c +2 -2
@@ -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);
Signature · 1 line
2.7.4
[tip: irq/urgent] irqchip/sifive-plic: Skip contexts except supervisor in plic_init()
The following commit has been merged into the irq/urgent branch of tip:
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: 41860cc447045c811ce6d5a92f93a065a691fe8e Gitweb: https://git.kernel.org/tip/41860cc447045c811ce6d5a92f93a065a691fe8e Author: Alan Mikhak <[email protected]> AuthorDate: Thu, 24 Oct 2019 09:11:43 -07:00 Committer: Marc Zyngier <[email protected]> CommitterDate: Fri, 25 Oct 2019 11:48:13 +01:00
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.
--- drivers/irqchip/irq-sifive-plic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/irqchip/irq-sifive-plic.c +2 -2
@@ -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);