public inbox for opensbi@lists.infradead.org
 help / color / mirror / Atom feed
From: "David E. Garcia Porras" <david.garcia@aheadcomputing.com>
To: opensbi@lists.infradead.org
Cc: "David E. Garcia Porras" <david.garcia@aheadcomputing.com>
Subject: [PATCH 2/4] lib: utils: irqchip: aplic: Add aplic_get_list() accessor
Date: Fri, 27 Mar 2026 23:43:45 -0600	[thread overview]
Message-ID: <20260328054347.3706029-3-david.garcia@aheadcomputing.com> (raw)
In-Reply-To: <20260328054347.3706029-1-david.garcia@aheadcomputing.com>

The internal aplic_list is static, preventing platform code from
iterating over registered APLIC devices for custom configuration
(e.g. enabling domain-level interrupts in MSI delivery mode).

Add aplic_get_list() to return a pointer to the list head, allowing
platform code to walk registered APLIC devices without breaking
encapsulation by extern-ing the static list directly.

Signed-off-by: David E. Garcia Porras <david.garcia@aheadcomputing.com>
---
 include/sbi_utils/irqchip/aplic.h | 2 ++
 lib/utils/irqchip/aplic.c         | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/include/sbi_utils/irqchip/aplic.h b/include/sbi_utils/irqchip/aplic.h
index 286c8f94..e2cf5808 100644
--- a/include/sbi_utils/irqchip/aplic.h
+++ b/include/sbi_utils/irqchip/aplic.h
@@ -152,6 +152,8 @@ struct aplic_data {
 
 int aplic_cold_irqchip_init(struct aplic_data *aplic);
 
+struct sbi_dlist *aplic_get_list(void);
+
 void aplic_reinit_all(void);
 
 #endif
diff --git a/lib/utils/irqchip/aplic.c b/lib/utils/irqchip/aplic.c
index a20cecf2..ad9abf86 100644
--- a/lib/utils/irqchip/aplic.c
+++ b/lib/utils/irqchip/aplic.c
@@ -90,6 +90,11 @@ static void aplic_init(struct aplic_data *aplic)
 	}
 }
 
+struct sbi_dlist *aplic_get_list(void)
+{
+	return &aplic_list;
+}
+
 void aplic_reinit_all(void)
 {
 	struct aplic_data *aplic;
-- 
2.43.0


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

  parent reply	other threads:[~2026-03-28  5:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-28  5:43 [PATCH 0/4] irqchip/rpmi: Expose APLIC/IMSIC interfaces for platform use David E. Garcia Porras
2026-03-28  5:43 ` [PATCH 1/4] lib: utils: irqchip: aplic: Move register defines to public header David E. Garcia Porras
2026-03-28  5:43 ` David E. Garcia Porras [this message]
2026-03-28  5:43 ` [PATCH 3/4] lib: utils: irqchip: imsic: Dispatch non-IPI interrupts via irqchip framework David E. Garcia Porras
2026-03-28  5:43 ` [PATCH 4/4] include: mailbox: rpmi_msgprot: Add RPMI performance domain flag defines David E. Garcia Porras

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=20260328054347.3706029-3-david.garcia@aheadcomputing.com \
    --to=david.garcia@aheadcomputing.com \
    --cc=opensbi@lists.infradead.org \
    /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