[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <176158268117.2601451.3370006380098181189.tip-bot2@tip-bot2>
Date: Mon, 27 Oct 2025 16:31:21 -0000
From: "tip-bot2 for Marc Zyngier" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Marc Zyngier <maz@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
Will Deacon <will@...nel.org>, Jonathan Cameron <jonathan.cameron@...wei.com>,
"Rafael J. Wysocki (Intel)" <rafael@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: irq/core] ACPI: irq: Add interrupt affinity reporting interface
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 5324fe21ba9b77b299c02191645a97777cdd73ac
Gitweb: https://git.kernel.org/tip/5324fe21ba9b77b299c02191645a97777cdd73ac
Author: Marc Zyngier <maz@...nel.org>
AuthorDate: Mon, 20 Oct 2025 13:29:19 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Mon, 27 Oct 2025 17:16:32 +01:00
ACPI: irq: Add interrupt affinity reporting interface
Plug the irq_populate_fwspec_info() helper into the ACPI layer to offer an
interrupt affinity reporting function. This is currently only supported for
the CONFIG_ACPI_GENERIC_GSI configurations, but could later be extended to
legacy architectures if necessary.
Signed-off-by: Marc Zyngier <maz@...nel.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Tested-by: Will Deacon <will@...nel.org>
Reviewed-by: Jonathan Cameron <jonathan.cameron@...wei.com>
Acked-by: Rafael J. Wysocki (Intel) <rafael@...nel.org>
Link: https://patch.msgid.link/20251020122944.3074811-3-maz@kernel.org
---
drivers/acpi/irq.c | 19 +++++++++++++++++++
include/linux/acpi.h | 7 +++++++
2 files changed, 26 insertions(+)
diff --git a/drivers/acpi/irq.c b/drivers/acpi/irq.c
index 76a856c..d159515 100644
--- a/drivers/acpi/irq.c
+++ b/drivers/acpi/irq.c
@@ -300,6 +300,25 @@ int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res)
}
EXPORT_SYMBOL_GPL(acpi_irq_get);
+const struct cpumask *acpi_irq_get_affinity(acpi_handle handle,
+ unsigned int index)
+{
+ struct irq_fwspec_info info;
+ struct irq_fwspec fwspec;
+ unsigned long flags;
+
+ if (acpi_irq_parse_one(handle, index, &fwspec, &flags))
+ return NULL;
+
+ if (irq_populate_fwspec_info(&fwspec, &info))
+ return NULL;
+
+ if (!(info.flags & IRQ_FWSPEC_INFO_AFFINITY_VALID))
+ return NULL;
+
+ return info.affinity;
+}
+
/**
* acpi_set_irq_model - Setup the GSI irqdomain information
* @model: the value assigned to acpi_irq_model
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 5ff5d99..607db77 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -1509,12 +1509,19 @@ static inline int acpi_parse_spcr(bool enable_earlycon, bool enable_console)
#if IS_ENABLED(CONFIG_ACPI_GENERIC_GSI)
int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res);
+const struct cpumask *acpi_irq_get_affinity(acpi_handle handle,
+ unsigned int index);
#else
static inline
int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res)
{
return -EINVAL;
}
+static inline const struct cpumask *acpi_irq_get_affinity(acpi_handle handle,
+ unsigned int index)
+{
+ return NULL;
+}
#endif
#ifdef CONFIG_ACPI_LPIT
Powered by blists - more mailing lists