Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Will Deacon <will@kernel.org>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Acked-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Link: https://patch.msgid.link/20251020122944.3074811-3-maz@kernel.org

authored by

Marc Zyngier and committed by
Thomas Gleixner
5324fe21 87b0031f

+26
+19
drivers/acpi/irq.c
··· 300 300 } 301 301 EXPORT_SYMBOL_GPL(acpi_irq_get); 302 302 303 + const struct cpumask *acpi_irq_get_affinity(acpi_handle handle, 304 + unsigned int index) 305 + { 306 + struct irq_fwspec_info info; 307 + struct irq_fwspec fwspec; 308 + unsigned long flags; 309 + 310 + if (acpi_irq_parse_one(handle, index, &fwspec, &flags)) 311 + return NULL; 312 + 313 + if (irq_populate_fwspec_info(&fwspec, &info)) 314 + return NULL; 315 + 316 + if (!(info.flags & IRQ_FWSPEC_INFO_AFFINITY_VALID)) 317 + return NULL; 318 + 319 + return info.affinity; 320 + } 321 + 303 322 /** 304 323 * acpi_set_irq_model - Setup the GSI irqdomain information 305 324 * @model: the value assigned to acpi_irq_model
+7
include/linux/acpi.h
··· 1509 1509 1510 1510 #if IS_ENABLED(CONFIG_ACPI_GENERIC_GSI) 1511 1511 int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res); 1512 + const struct cpumask *acpi_irq_get_affinity(acpi_handle handle, 1513 + unsigned int index); 1512 1514 #else 1513 1515 static inline 1514 1516 int acpi_irq_get(acpi_handle handle, unsigned int index, struct resource *res) 1515 1517 { 1516 1518 return -EINVAL; 1519 + } 1520 + static inline const struct cpumask *acpi_irq_get_affinity(acpi_handle handle, 1521 + unsigned int index) 1522 + { 1523 + return NULL; 1517 1524 } 1518 1525 #endif 1519 1526