Skip to content

Commit 5873ba5

Browse files
smaeulMarc Zyngier
authored andcommitted
irqchip/sifive-plic: Fix T-HEAD PLIC edge trigger handling
The T-HEAD PLIC ignores additional edges seen while an edge-triggered interrupt is being handled. Because of this behavior, the driver needs to complete edge-triggered interrupts in the .irq_ack callback before handling them, instead of in the .irq_eoi callback afterward. Otherwise, it could miss some interrupts. Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Guo Ren <guoren@kernel.org> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220630100241.35233-5-samuel@sholland.org
1 parent d60df7f commit 5873ba5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/irqchip/irq-sifive-plic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@ static int __init plic_init(struct device_node *node,
474474

475475
IRQCHIP_DECLARE(sifive_plic, "sifive,plic-1.0.0", plic_init);
476476
IRQCHIP_DECLARE(riscv_plic0, "riscv,plic0", plic_init); /* for legacy systems */
477-
IRQCHIP_DECLARE(thead_c900_plic, "thead,c900-plic", plic_init); /* for firmware driver */
478477

479478
static int __init plic_edge_init(struct device_node *node,
480479
struct device_node *parent)
@@ -483,3 +482,4 @@ static int __init plic_edge_init(struct device_node *node,
483482
}
484483

485484
IRQCHIP_DECLARE(andestech_nceplic100, "andestech,nceplic100", plic_edge_init);
485+
IRQCHIP_DECLARE(thead_c900_plic, "thead,c900-plic", plic_edge_init);

0 commit comments

Comments
 (0)