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 1/2] lib: sbi_mpxy: Enable MPXY channel MSI availability determination
Date: Thu,  9 Apr 2026 08:57:15 -0600	[thread overview]
Message-ID: <20260409145716.2611852-2-david.garcia@aheadcomputing.com> (raw)
In-Reply-To: <20260409145716.2611852-1-david.garcia@aheadcomputing.com>

Use imsic_get_data() to determine MSI availability for each MPXY
channel based on IMSIC presence per hart, instead of unconditionally
disabling it.

Add a static inline stub for imsic_get_data() when CONFIG_IRQCHIP_IMSIC
is not enabled.

Signed-off-by: David E. Garcia Porras <david.garcia@aheadcomputing.com>
---
 include/sbi_utils/irqchip/imsic.h | 2 ++
 lib/sbi/sbi_mpxy.c                | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/sbi_utils/irqchip/imsic.h b/include/sbi_utils/irqchip/imsic.h
index 88dd3cfb..68f3c4ad 100644
--- a/include/sbi_utils/irqchip/imsic.h
+++ b/include/sbi_utils/irqchip/imsic.h
@@ -54,6 +54,8 @@ static inline void imsic_local_irqchip_init(void) { }
 
 static inline int imsic_data_check(struct imsic_data *imsic) { return 0; }
 
+static inline struct imsic_data *imsic_get_data(u32 hartindex) { return NULL; }
+
 #endif
 
 #endif
diff --git a/lib/sbi/sbi_mpxy.c b/lib/sbi/sbi_mpxy.c
index a83cf16c..8ff52bb6 100644
--- a/lib/sbi/sbi_mpxy.c
+++ b/lib/sbi/sbi_mpxy.c
@@ -20,6 +20,7 @@
 #include <sbi/sbi_bitops.h>
 #include <sbi/sbi_console.h>
 #include <sbi/sbi_byteorder.h>
+#include <sbi_utils/irqchip/imsic.h>
 
 /** Shared memory size across all harts */
 static unsigned long mpxy_shmem_size = PAGE_SIZE;
@@ -255,11 +256,10 @@ static int domain_mpxy_state_data_setup(struct sbi_domain *dom,
 			return SBI_ENOMEM;
 
 		/*
-		 * TODO: Proper support for checking msi support from
-		 * platform. Currently disable msi and sse and use
-		 * polling
+		 * TODO: Proper support for checking sse support from
+		 * platform. Currently disable sse and use polling
 		 */
-		ms->msi_avail = false;
+		ms->msi_avail = !!imsic_get_data(i);
 		ms->sse_avail = false;
 
 		sbi_mpxy_shmem_disable(ms);
-- 
2.43.0


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

  reply	other threads:[~2026-04-09 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 14:57 [PATCH 0/2] MPXY MSI availability and RPMI notification updates David E. Garcia Porras
2026-04-09 14:57 ` David E. Garcia Porras [this message]
2026-04-09 14:57 ` [PATCH 2/2] include: mailbox: Update RPMI notification structs and add Performance event definitions 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=20260409145716.2611852-2-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