mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf: arm_cspmu: Set irq affinitiy only if overflow interrupt is used
@ 2023-06-08 20:37 Ilkka Koskinen
  2023-06-09 11:16 ` Will Deacon
  0 siblings, 1 reply; 2+ messages in thread
From: Ilkka Koskinen @ 2023-06-08 20:37 UTC (permalink / raw)
  To: Will Deacon, Mark Rutland, Besar Wicaksono, Suzuki K Poulose,
	Robin Murphy, Randy Dunlap
  Cc: linux-doc, linux-kernel, linux-arm-kernel, Ilkka Koskinen

Don't try to set irq affinity if PMU doesn't have an overflow interrupt.

Fixes: e37dfd65731d ("perf: arm_cspmu: Add support for ARM CoreSight PMU driver")
Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
---
 drivers/perf/arm_cspmu/arm_cspmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c
index 9021d1878250..62be0956dbba 100644
--- a/drivers/perf/arm_cspmu/arm_cspmu.c
+++ b/drivers/perf/arm_cspmu/arm_cspmu.c
@@ -1250,7 +1250,8 @@ static struct platform_driver arm_cspmu_driver = {
 static void arm_cspmu_set_active_cpu(int cpu, struct arm_cspmu *cspmu)
 {
 	cpumask_set_cpu(cpu, &cspmu->active_cpu);
-	WARN_ON(irq_set_affinity(cspmu->irq, &cspmu->active_cpu));
+	if (cspmu->irq)
+		WARN_ON(irq_set_affinity(cspmu->irq, &cspmu->active_cpu));
 }
 
 static int arm_cspmu_cpu_online(unsigned int cpu, struct hlist_node *node)
-- 
2.40.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] perf: arm_cspmu: Set irq affinitiy only if overflow interrupt is used
  2023-06-08 20:37 [PATCH] perf: arm_cspmu: Set irq affinitiy only if overflow interrupt is used Ilkka Koskinen
@ 2023-06-09 11:16 ` Will Deacon
  0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2023-06-09 11:16 UTC (permalink / raw)
  To: Randy Dunlap, Ilkka Koskinen, Besar Wicaksono, Suzuki K Poulose,
	Mark Rutland, Robin Murphy
  Cc: catalin.marinas, kernel-team, Will Deacon, linux-doc,
	linux-arm-kernel, linux-kernel

On Thu, 8 Jun 2023 13:37:42 -0700, Ilkka Koskinen wrote:
> Don't try to set irq affinity if PMU doesn't have an overflow interrupt.
> 
> 

Applied to will (for-next/perf), thanks!

[1/1] perf: arm_cspmu: Set irq affinitiy only if overflow interrupt is used
      https://git.kernel.org/will/c/225d757012e0

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-09 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08 20:37 [PATCH] perf: arm_cspmu: Set irq affinitiy only if overflow interrupt is used Ilkka Koskinen
2023-06-09 11:16 ` Will Deacon

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®