mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
perf/arm_pmu_platform: Use dev_err_probe() for IRQ errors
[ Upstream commit 11fa1dc802 ]
By virtue of using platform_irq_get_optional() under the covers,
platform_irq_count() needs the target interrupt controller to be
available and may return -EPROBE_DEFER if it isn't. Let's use
dev_err_probe() to avoid a spurious error log (and help debug any
deferral issues) in that case.
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/073d5e0d3ed1f040592cb47ca6fe3759f40cc7d1.1616774562.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
64d579453b
commit
167fecaa43
|
|
@ -6,6 +6,7 @@
|
||||||
* Copyright (C) 2010 ARM Ltd., Will Deacon <will.deacon@arm.com>
|
* Copyright (C) 2010 ARM Ltd., Will Deacon <will.deacon@arm.com>
|
||||||
*/
|
*/
|
||||||
#define pr_fmt(fmt) "hw perfevents: " fmt
|
#define pr_fmt(fmt) "hw perfevents: " fmt
|
||||||
|
#define dev_fmt pr_fmt
|
||||||
|
|
||||||
#include <linux/bug.h>
|
#include <linux/bug.h>
|
||||||
#include <linux/cpumask.h>
|
#include <linux/cpumask.h>
|
||||||
|
|
@ -100,10 +101,8 @@ static int pmu_parse_irqs(struct arm_pmu *pmu)
|
||||||
struct pmu_hw_events __percpu *hw_events = pmu->hw_events;
|
struct pmu_hw_events __percpu *hw_events = pmu->hw_events;
|
||||||
|
|
||||||
num_irqs = platform_irq_count(pdev);
|
num_irqs = platform_irq_count(pdev);
|
||||||
if (num_irqs < 0) {
|
if (num_irqs < 0)
|
||||||
pr_err("unable to count PMU IRQs\n");
|
return dev_err_probe(&pdev->dev, num_irqs, "unable to count PMU IRQs\n");
|
||||||
return num_irqs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In this case we have no idea which CPUs are covered by the PMU.
|
* In this case we have no idea which CPUs are covered by the PMU.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user