[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250916162346.0000782a@huawei.com>
Date: Tue, 16 Sep 2025 16:23:46 +0100
From: Jonathan Cameron <jonathan.cameron@...wei.com>
To: Marc Zyngier <maz@...nel.org>
CC: <linux-kernel@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-acpi@...r.kernel.org>, Thomas Gleixner <tglx@...utronix.de>, "Mark
Rutland" <mark.rutland@....com>, Will Deacon <will@...nel.org>, "Rafael J.
Wysocki" <rafael@...nel.org>, Rob Herring <robh@...nel.org>, "Saravana
Kannan" <saravanak@...gle.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Sven Peter <sven@...nel.org>, Janne Grunau
<j@...nau.net>, Suzuki K Poulose <suzuki.poulose@....com>, James Clark
<james.clark@...aro.org>
Subject: Re: [PATCH v2 04/25] platform: Add firmware-agnostic irq and
affinity retrieval interface
On Mon, 15 Sep 2025 09:56:41 +0100
Marc Zyngier <maz@...nel.org> wrote:
> Expand platform_get_irq_optional() to also return an affinity if
> available, renaming it to platform_get_irq_affinity() in the
> process.
>
> platform_get_irq_optional() is preserved with its current semantics
> by calling into the new helper with a NULL affinity pointer.
>
> Signed-off-by: Marc Zyngier <maz@...nel.org>
> ---
> drivers/base/platform.c | 60 +++++++++++++++++++++++++++------
> include/linux/platform_device.h | 2 ++
> 2 files changed, 52 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index 09450349cf323..fad33d6b2349a 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> /**
> - * platform_get_irq_optional - get an optional IRQ for a device
> + * platform_get_irq_affinity - get an optional IRQ and its affnity for a device
affinity
> * @dev: platform device
> * @num: IRQ number index
> + * @affinity: optional cpumask pointer to get the affinity of a per-cpu IRQ
> *
> diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
> index 074754c23d330..ad66333ce85ce 100644
> --- a/include/linux/platform_device.h
> +++ b/include/linux/platform_device.h
> @@ -102,6 +102,8 @@ devm_platform_ioremap_resource_byname(struct platform_device *pdev,
>
> extern int platform_get_irq(struct platform_device *, unsigned int);
> extern int platform_get_irq_optional(struct platform_device *, unsigned int);
> +extern int platform_get_irq_affinity(struct platform_device *, unsigned int,
> + const struct cpumask **);
> extern int platform_irq_count(struct platform_device *);
> extern int devm_platform_get_irqs_affinity(struct platform_device *dev,
> struct irq_affinity *affd,
Powered by blists - more mailing lists