Skip to content

RFC Introduce irqchip and VIRQ layer prototypes

Raymond Mao opensbi 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest2 patches 7 repliesIn review
  2. v1 RFC2 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Move INTC to irqchip
- Move hwirq mapping to VIRQ
- Remove get_caps and pass in max_src during provider registration
- All irqchip interface use hwirq as parameter

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2lib: sbi: introduce abstraction for wired interrupt handlinginclude/sbi/sbi_irqchip.h+52 -02 replies
2/2lib: sbi: Add VIRQ interrupt abstractioninclude/sbi/sbi_virq.h+90 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [RFC v2 PATCH 0/2] Introduce irqchip and VIRQ layer prototypes

From: Raymond Mao <[email protected]>

This RFC introduces irqchip abstraction and VIRQ layers for APLIC wired interrupt support in OpenSBI.

In the current OpenSBI implementation, APLIC support primarily focuses on initialization and delegation, while external interrupt handling for wired interrupts remains largely stubbed. As a result:
- There is no generic mechanism for OpenSBI drivers or platforms to register handlers for wired interrupt lines.
- Interrupt dispatch remains tightly coupled to specific irqchip implementations.

The goal is to introduce a small, extensible abstraction for irqchip to hide the HW details and provide abstract operations like interrupt provider registration, claim/complete/mask/unmask operations.

VIRQ (Virtual IRQ) layer is on top of INTC, providing IRQ state management via per-(domain,hart) IRQ pending queue, with courier dispatching and interface to enqueue/pop/complete an IRQ and map hwirq to virtual IRQ number to avoid exposure of hwirq.

Raymond Mao (2):
lib: sbi: introduce abstraction for wired interrupt handling
lib: sbi: Add VIRQ interrupt abstraction

Changes in v2:
- Move INTC to irqchip
- Move hwirq mapping to VIRQ
- Remove get_caps and pass in max_src during provider registration
- All irqchip interface use hwirq as parameter

 include/sbi/sbi_irqchip.h | 52 ++++++++++++++++++++++
 include/sbi/sbi_virq.h    | 90 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 142 insertions(+)
 create mode 100644 include/sbi/sbi_virq.h
Signature · 7 lines
2.25.1


-- 
opensbi mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/opensbi