From: Shankar C <shankar.c@oss.qualcomm.com>
To: anup@brainfault.org, tglx@kernel.org, radu@rendec.net,
pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
alex@ghiti.fr, sunilvl@oss.qualcomm.com
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
shankar@fw64.net, Shankar C <shankar.c@oss.qualcomm.com>
Subject: [PATCH] irqchip/riscv-imsic: Use the global config for ACPI fwnode lookup
Date: Thu, 26 Nov 2026 14:55:30 +0000 [thread overview]
Message-ID: <20261126145530.634759-1-shankar.c@oss.qualcomm.com> (raw)
The IMSIC firmware node is already available through the global
configuration, so the separate ACPI fwnode pointer duplicates that
state.
Signed-off-by: Shankar C <shankar.c@oss.qualcomm.com>
---
drivers/irqchip/irq-riscv-imsic-early.c | 9 +--------
include/linux/irqchip/riscv-imsic.h | 9 ++++++++-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/irqchip/irq-riscv-imsic-early.c b/drivers/irqchip/irq-riscv-imsic-early.c
index 06726a062b75..0fb5484d0cd7 100644
--- a/drivers/irqchip/irq-riscv-imsic-early.c
+++ b/drivers/irqchip/irq-riscv-imsic-early.c
@@ -248,17 +248,10 @@ IRQCHIP_DECLARE(riscv_imsic, "riscv,imsics", imsic_early_dt_init);
#ifdef CONFIG_ACPI
-static struct fwnode_handle *imsic_acpi_fwnode;
-
-struct fwnode_handle *imsic_acpi_get_fwnode(struct device *dev)
-{
- return imsic_acpi_fwnode;
-}
-EXPORT_SYMBOL_GPL(imsic_acpi_get_fwnode);
-
static int __init imsic_early_acpi_init(union acpi_subtable_headers *header,
const unsigned long end)
{
+ struct fwnode_handle *imsic_acpi_fwnode;
struct acpi_madt_imsic *imsic = (struct acpi_madt_imsic *)header;
int rc;
diff --git a/include/linux/irqchip/riscv-imsic.h b/include/linux/irqchip/riscv-imsic.h
index b7be1aad7774..692be2321046 100644
--- a/include/linux/irqchip/riscv-imsic.h
+++ b/include/linux/irqchip/riscv-imsic.h
@@ -96,7 +96,14 @@ static inline const struct imsic_global_config *imsic_get_global_config(void)
#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_RISCV_IMSIC)
int imsic_platform_acpi_probe(struct fwnode_handle *fwnode);
-struct fwnode_handle *imsic_acpi_get_fwnode(struct device *dev);
+
+static inline struct fwnode_handle *imsic_acpi_get_fwnode(struct device *dev)
+{
+ if (imsic_get_global_config())
+ return imsic_get_global_config()->fwnode;
+
+ return NULL;
+}
#else
static inline struct fwnode_handle *imsic_acpi_get_fwnode(struct device *dev) { return NULL; }
#endif
--
2.47.3
reply other threads:[~2026-11-26 14:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261126145530.634759-1-shankar.c@oss.qualcomm.com \
--to=shankar.c@oss.qualcomm.com \
--cc=alex@ghiti.fr \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=radu@rendec.net \
--cc=shankar@fw64.net \
--cc=sunilvl@oss.qualcomm.com \
--cc=tglx@kernel.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
all inboxes | Powered by JetHome®