diff options
author | Mark Salter <msalter@redhat.com> | 2016-06-07 12:32:21 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-06-15 04:51:35 -0400 |
commit | f7a6c1492a2cb596952260a7d5bb0d61ca815173 (patch) | |
tree | 966c8e457ba6986a2fa9a23119511f6fe626c9b8 | |
parent | bbb1681ee3653bdcfc6a4ba31902738118311fd4 (diff) |
arm: pmu: Fix non-devicetree probing
There is a problem in the non-devicetree PMU probing where some
probe functions may get the number of supported events through
smp_call_function_any() using the arm_pmu supported_cpus mask.
But at the time the probe function is called, the supported_cpus
mask is empty so the call fails. This patch makes sure the mask
is set before calling the init function rather than after.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | drivers/perf/arm_pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index 1b8304e1efaa..140436a046c0 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c | |||
@@ -1010,8 +1010,8 @@ int arm_pmu_device_probe(struct platform_device *pdev, | |||
1010 | if (!ret) | 1010 | if (!ret) |
1011 | ret = init_fn(pmu); | 1011 | ret = init_fn(pmu); |
1012 | } else { | 1012 | } else { |
1013 | ret = probe_current_pmu(pmu, probe_table); | ||
1014 | cpumask_setall(&pmu->supported_cpus); | 1013 | cpumask_setall(&pmu->supported_cpus); |
1014 | ret = probe_current_pmu(pmu, probe_table); | ||
1015 | } | 1015 | } |
1016 | 1016 | ||
1017 | if (ret) { | 1017 | if (ret) { |