aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorShannon Zhao <shannon.zhao@linaro.org>2015-06-29 04:02:40 -0400
committerCatalin Marinas <catalin.marinas@arm.com>2015-06-30 13:13:05 -0400
commitb265da5a45ce60bd3d7505cc0eaa6cfba50946a1 (patch)
tree2fb8f58816d762241dcbc9120fad40e32b4a8c43 /arch
parent18a11b5e79697ddc61e30181737c91ce21eaa859 (diff)
arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs
Commit d795ef9aa831 ("arm64: perf: don't warn about missing interrupt-affinity property for PPIs") added a check for PPIs so that we avoid parsing the interrupt-affinity property for these naturally affine interrupts. Unfortunately, this check can trigger an early (successful) return and we will not assign the value of cpu_pmu->plat_device. This patch fixes the issue. Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/kernel/perf_event.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
index 8af7784a8e35..b31e9a4b6275 100644
--- a/arch/arm64/kernel/perf_event.c
+++ b/arch/arm64/kernel/perf_event.c
@@ -1318,7 +1318,7 @@ static int armpmu_device_probe(struct platform_device *pdev)
1318 /* Don't bother with PPIs; they're already affine */ 1318 /* Don't bother with PPIs; they're already affine */
1319 irq = platform_get_irq(pdev, 0); 1319 irq = platform_get_irq(pdev, 0);
1320 if (irq >= 0 && irq_is_percpu(irq)) 1320 if (irq >= 0 && irq_is_percpu(irq))
1321 return 0; 1321 goto out;
1322 1322
1323 irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL); 1323 irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
1324 if (!irqs) 1324 if (!irqs)
@@ -1356,6 +1356,7 @@ static int armpmu_device_probe(struct platform_device *pdev)
1356 else 1356 else
1357 kfree(irqs); 1357 kfree(irqs);
1358 1358
1359out:
1359 cpu_pmu->plat_device = pdev; 1360 cpu_pmu->plat_device = pdev;
1360 return 0; 1361 return 0;
1361} 1362}