[PATCH v2 0/2] irqchip/riscv-aplic: Use trigger specific flow handlers in MSI mode
Troy Mitchell
troy.mitchell at linux.dev
Tue Nov 10 04:06:28 PST 2026
In MSI mode the APLIC handles all sources with handle_fasteoi_irq().
For edge-triggered sources this loses an interrupt which arrives on
the new CPU while the previous one is still being handled after an
affinity change. The fasteoi flow also never calls irq_ack(), where
IMSIC applies an affinity change deferred while a previous vector move
was in flight. Such a change stays pending, and later affinity changes
of the interrupt only update the pending mask.
Use handle_edge_irq() for edge-triggered sources and
handle_fasteoi_ack_irq() for level-triggered sources.
---
Changes in v2:
- Use handle_edge_irq() for edge-triggered sources instead of calling
the parent ack from the EOI callback
- Use handle_fasteoi_ack_irq() for level-triggered sources
- Split into two patches
- Link to v1: https://patch.msgid.link/20261104-aplic-affinity-fix-v1-1-e538cd76e563@linux.dev
To: Anup Patel <anup at brainfault.org>
To: Thomas Gleixner <tglx at kernel.org>
To: Radu Rendec <radu at rendec.net>
To: Paul Walmsley <pjw at kernel.org>
To: Palmer Dabbelt <palmer at dabbelt.com>
To: Albert Ou <aou at eecs.berkeley.edu>
To: Alexandre Ghiti <alex at ghiti.fr>
To: Björn Töpel <bjorn at rivosinc.com>
Cc: Anup Patel <apatel at ventanamicro.com>
Cc: linux-riscv at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
---
Troy Mitchell (2):
irqchip/riscv-aplic: Use handle_edge_irq() for edge-triggered MSI sources
irqchip/riscv-aplic: Apply pending affinity changes for level MSI sources
drivers/irqchip/Kconfig | 1 +
drivers/irqchip/irq-riscv-aplic-msi.c | 19 ++++++++++++++++++-
2 files changed, 19 insertions(+), 1 deletion(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20260909-aplic-affinity-fix-80a4b30bd03e
Best regards,
--
Troy Mitchell <troy.mitchell at linux.dev>
More information about the linux-riscv
mailing list