diff options
author | Dave Martin <dave.martin@linaro.org> | 2012-12-12 18:13:44 +0000 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2013-05-25 13:22:23 +0400 |
commit | b115c4933bebff32c29da495cd0c8ade248548c3 (patch) | |
tree | 944160a731061b77c6bbd413c0cc58e7a6672de8 | |
parent | 580b7756c57e94e1b95d170594e0137607c75914 (diff) |
ARM: perf: [WIP] Check PMU is valid for the CPU in armpmu_disable()
This hack is required in order to be able to manipulate the CPU
logical state safely in the absence of the b.L switcher, for test
purposes.
The other similar checks are already present in the b.L MP perf
support patches.
Normally, only the physical PMU state should be mainpulated in a
kernel which doesn't include the switcher, so it may be possible to
remove this patch later.
Signed-off-by: Dave Martin <dave.martin@linaro.org>
-rw-r--r-- | arch/arm/kernel/perf_event.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index a60faca1f29..3d753cc4aa0 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -483,6 +483,10 @@ static void armpmu_enable(struct pmu *pmu) static void armpmu_disable(struct pmu *pmu) { struct arm_pmu *armpmu = to_arm_pmu(pmu); + + if (!cpumask_test_cpu(smp_processor_id(), &armpmu->valid_cpus)) + return; + armpmu->stop(armpmu); } |