Commit b265da5a authored by Shannon Zhao's avatar Shannon Zhao Committed by Catalin Marinas

arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs

Commit d795ef9a ("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: default avatarShannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 18a11b5e
...@@ -1318,7 +1318,7 @@ static int armpmu_device_probe(struct platform_device *pdev) ...@@ -1318,7 +1318,7 @@ static int armpmu_device_probe(struct platform_device *pdev)
/* Don't bother with PPIs; they're already affine */ /* Don't bother with PPIs; they're already affine */
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq >= 0 && irq_is_percpu(irq)) if (irq >= 0 && irq_is_percpu(irq))
return 0; goto out;
irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL); irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
if (!irqs) if (!irqs)
...@@ -1356,6 +1356,7 @@ static int armpmu_device_probe(struct platform_device *pdev) ...@@ -1356,6 +1356,7 @@ static int armpmu_device_probe(struct platform_device *pdev)
else else
kfree(irqs); kfree(irqs);
out:
cpu_pmu->plat_device = pdev; cpu_pmu->plat_device = pdev;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment