public inbox for opensbi@lists.infradead.org
 help / color / mirror / Atom feed
From: Raymond Mao <raymondmaoca@gmail.com>
To: opensbi@lists.infradead.org
Cc: scott@riscstar.com, dave.patel@riscstar.com,
	raymond.mao@riscstar.com, robin.randhawa@sifive.com,
	samuel.holland@sifive.com, anup.patel@qti.qualcomm.com,
	anuppate@qti.qualcomm.com, dhaval@rivosinc.com,
	peter.lin@sifive.com
Subject: [RFC v2 PATCH 0/2] Introduce irqchip and VIRQ layer prototypes
Date: Mon,  2 Feb 2026 10:02:05 -0500	[thread overview]
Message-ID: <20260202150207.1331811-1-raymondmaoca@gmail.com> (raw)

From: Raymond Mao <raymond.mao@riscstar.com>

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

-- 
2.25.1


-- 
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

             reply	other threads:[~2026-02-02 15:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 15:02 Raymond Mao [this message]
2026-02-02 15:02 ` [PATCH v2 1/2] lib: sbi: introduce abstraction for wired interrupt handling Raymond Mao
2026-02-07 10:10   ` Anup Patel
2026-02-07 16:23     ` Raymond Mao
2026-02-02 15:02 ` [PATCH v2 2/2] lib: sbi: Add VIRQ interrupt abstraction Raymond Mao
2026-02-07 10:07 ` [RFC v2 PATCH 0/2] Introduce irqchip and VIRQ layer prototypes Anup Patel
2026-02-07 16:11   ` Raymond Mao
2026-02-08 13:23     ` Anup Patel
2026-02-08 18:50       ` Raymond Mao
2026-02-10 16:06         ` Anup Patel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260202150207.1331811-1-raymondmaoca@gmail.com \
    --to=raymondmaoca@gmail.com \
    --cc=anup.patel@qti.qualcomm.com \
    --cc=anuppate@qti.qualcomm.com \
    --cc=dave.patel@riscstar.com \
    --cc=dhaval@rivosinc.com \
    --cc=opensbi@lists.infradead.org \
    --cc=peter.lin@sifive.com \
    --cc=raymond.mao@riscstar.com \
    --cc=robin.randhawa@sifive.com \
    --cc=samuel.holland@sifive.com \
    --cc=scott@riscstar.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox