[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200319143250.GA4876@lakrids.cambridge.arm.com>
Date: Thu, 19 Mar 2020 14:32:51 +0000
From: Mark Rutland <mark.rutland@....com>
To: Tuan Phan <tuanphan@...amperecomputing.com>
Cc: patches@...erecomputing.com, Will Deacon <will@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] perf: dsu: Allow multiple devices share same IRQ.
On Tue, Mar 17, 2020 at 05:26:15PM -0700, Tuan Phan wrote:
> Add IRQF_SHARED flag when register IRQ such that multiple dsu
> devices can share same IRQ.
>
> Signed-off-by: Tuan Phan <tuanphan@...amperecomputing.com>
I don't think that this makes sense; further I think that this
highlights that the current driver doesn't support such a configuration
for other reasons.
A DSU instance can only be accessed from a CPU associated with it, since
it's accessed via sysregs. The IRQ handler must run on one of those
CPUs.
To handle that, the DSU PMU driver will need to gain an understanding of
which CPUs are associated with the instance. As it stands the driver
seems to assume that there's a single DSU instance, and that all CPUs
are affine to that same instance.
So NAK to this patch, given the above.
Thanks,
Mark.
> ---
> drivers/perf/arm_dsu_pmu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/perf/arm_dsu_pmu.c b/drivers/perf/arm_dsu_pmu.c
> index 70968c8..2622900 100644
> --- a/drivers/perf/arm_dsu_pmu.c
> +++ b/drivers/perf/arm_dsu_pmu.c
> @@ -700,7 +700,7 @@ static int dsu_pmu_device_probe(struct platform_device *pdev)
> if (!name)
> return -ENOMEM;
> rc = devm_request_irq(&pdev->dev, irq, dsu_pmu_handle_irq,
> - IRQF_NOBALANCING, name, dsu_pmu);
> + IRQF_NOBALANCING | IRQF_SHARED, name, dsu_pmu);
> if (rc) {
> dev_warn(&pdev->dev, "Failed to request IRQ %d\n", irq);
> return rc;
> --
> 2.7.4
>
Powered by blists - more mailing lists