From: Sunil V L <sunilvl@oss.qualcomm.com>
To: Shankar C <shankar.c@oss.qualcomm.com>
Cc: anup@brainfault.org, tglx@kernel.org, radu@rendec.net,
pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
alex@ghiti.fr, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org, shankar@fw64.net
Subject: Re: [PATCH v2] irqchip/riscv-imsic: Use the global config for ACPI fwnode lookup
Date: Mon, 30 Nov 2026 18:13:20 +0530 [thread overview]
Message-ID: <CAB19ukHGC71M7tPWCFbufSwVCAYy1sE+nBe9pzR+TCYPcOhCMQ@mail.gmail.com> (raw)
In-Reply-To: <20261130094214.263404-1-shankar.c@oss.qualcomm.com>
On Mon, Nov 30, 2026 at 3:12 PM Shankar C <shankar.c@oss.qualcomm.com> wrote:
>
> The IMSIC firmware node is already available through the global
> configuration, so the separate ACPI fwnode pointer duplicates that
> state.
>
I think "Already” is a bit misleading here and the commit message
needs to describe the change in the
imperative mood. Something like below would be a better commit message.
Use the fwnode exposed by the global configuration in commit
ff6f8cd2919b ("irqchip/riscv-imsic: Expose the fwnode via the global
config"). Remove the separate ACPI fwnode pointer to avoid duplicating
the reference.
> Signed-off-by: Shankar C <shankar.c@oss.qualcomm.com>
> ---
> Changes in v2:
> - Store the global configuration pointer locally to avoid calling
> imsic_get_global_config() twice in imsic_acpi_get_fwnode().
>
> drivers/irqchip/irq-riscv-imsic-early.c | 9 +--------
> include/linux/irqchip/riscv-imsic.h | 8 +++++++-
> 2 files changed, 8 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..886f82e52546 100644
> --- a/include/linux/irqchip/riscv-imsic.h
> +++ b/include/linux/irqchip/riscv-imsic.h
> @@ -96,7 +96,13 @@ 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)
> +{
> + const struct imsic_global_config *global = imsic_get_global_config();
> +
> + return global ? global->fwnode : NULL;
> +}
> #else
> static inline struct fwnode_handle *imsic_acpi_get_fwnode(struct device *dev) { return NULL; }
> #endif
>
Otherwise, LGTM.
Reviewed-by: Sunil V L <sunilvl@oss.qualcomm.com>
prev parent reply other threads:[~2026-11-30 12:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 9:42 Shankar C
2026-11-30 12:43 ` Sunil V L [this message]
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=CAB19ukHGC71M7tPWCFbufSwVCAYy1sE+nBe9pzR+TCYPcOhCMQ@mail.gmail.com \
--to=sunilvl@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.c@oss.qualcomm.com \
--cc=shankar@fw64.net \
--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®