Skip to content

irqchip/riscv-aplic: Use trigger specific flow handlers in MSI mode

Troy Mitchell linux-riscv lkml spacemit 3 versions – New

Get series with b4
b4 am [email protected] change-id 20260909-aplic-affinity-fix-80a4b30bd03e

Versions newest first

  1. v3 Latest2 patches 0 repliesNew
  2. v22 patches 3 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Changes in v3 from the cover letter

- Add Suggested-by: Thomas Gleixner to patch 1
- Add braces around the multi-line if/else branches
- Link to v2: https://patch.msgid.link/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2irqchip/riscv-aplic: Use handle_edge_irq() for edge-triggered MSI sourcesdrivers/irqchip/irq-riscv-aplic-msi.c+15 -00 replies
2/2irqchip/riscv-aplic: Apply pending affinity changes for level MSI sourcesdrivers/irqchip/Kconfig drivers/irqchip/irq-riscv-aplic-msi.c+6 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] irqchip/riscv-aplic: Use trigger specific flow handlers in MSI mode

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 v3:
- Add Suggested-by: Thomas Gleixner to patch 1
- Add braces around the multi-line if/else branches
- Link to v2: https://patch.msgid.link/[email protected]

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/[email protected]

---
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 | 20 +++++++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20260909-aplic-affinity-fix-80a4b30bd03e

Best regards,

Signature · 1 line
Troy Mitchell <[email protected]>