summaryrefslogtreecommitdiffstats
path: root/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-05-18 11:17:33 +0200
committerWill Deacon <will@kernel.org>2021-05-24 11:02:00 +0100
commit77b06ddc04354293f746d0434f00700110d3392d (patch)
tree291a5827eed567c9bebcb9e8308a6c32c4303f27 /drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
parentba4489fb949cbd9c9b877dceae361129ed6280f1 (diff)
downloadlinux-77b06ddc04354293f746d0434f00700110d3392d.tar.bz2
perf/hisi: Use irq_set_affinity()
These drivers use irq_set_affinity_hint() to set the affinity for the PMU interrupts, which relies on the undocumented side effect that this function actually sets the affinity under the hood. Setting an hint is clearly not a guarantee and for these PMU interrupts an affinity hint, which is supposed to guide userspace for setting affinity, is beyond pointless, because the affinity of these interrupts cannot be modified from user space. Aside of that the error checks are bogus because the only error which is returned from irq_set_affinity_hint() is when there is no irq descriptor for the interrupt number, but not when the affinity set fails. That's on purpose because the hint can point to an offline CPU. Replace the mindless abuse with irq_set_affinity(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Shaokun Zhang <zhangshaokun@hisilicon.com> Cc: Will Deacon <will@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-arm-kernel@lists.infradead.org Acked-by: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/r/20210518093118.813375875@linutronix.de Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c')
-rw-r--r--drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
index bf9f7772cac9..773f69538090 100644
--- a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
+++ b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c
@@ -578,7 +578,6 @@ static int hisi_l3c_pmu_probe(struct platform_device *pdev)
dev_err(l3c_pmu->dev, "L3C PMU register failed!\n");
cpuhp_state_remove_instance_nocalls(
CPUHP_AP_PERF_ARM_HISI_L3_ONLINE, &l3c_pmu->node);
- irq_set_affinity_hint(l3c_pmu->irq, NULL);
}
return ret;
@@ -591,8 +590,6 @@ static int hisi_l3c_pmu_remove(struct platform_device *pdev)
perf_pmu_unregister(&l3c_pmu->pmu);
cpuhp_state_remove_instance_nocalls(CPUHP_AP_PERF_ARM_HISI_L3_ONLINE,
&l3c_pmu->node);
- irq_set_affinity_hint(l3c_pmu->irq, NULL);
-
return 0;
}