diff options
author | Neil Leeder <nleeder@codeaurora.org> | 2014-08-29 14:55:42 -0400 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:58:12 -0700 |
commit | 6470f7956ac6b479a1697e567a47bebd90095bb2 (patch) | |
tree | f117aa61f0657f9a4d2c181deb8d93bcd6251f6a /drivers/perf | |
parent | 09e03e5113703a706c4c105f7293080c0ea1aef3 (diff) |
Perf: arm64: restore registers after reset
Reset will overwrite registers written by
restore_pm_registers, so order the calls correctly.
Change-Id: I8210d61c2f4c2397efb2de801d94ed1d5aad480c
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: merge conflict resolution and move changes in
arch/arm64/kernel/perf_event.c to drivers/perf/arm_pmu.c
to align with kernel 4.4]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Diffstat (limited to 'drivers/perf')
-rw-r--r-- | drivers/perf/arm_pmu.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index d8708fe77317..67b6b5bc3482 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -858,15 +858,16 @@ static int perf_cpu_pm_notifier(struct notifier_block *self, unsigned long cmd, case CPU_PM_ENTER_FAILED: case CPU_PM_EXIT: + if (cpu_has_active_perf(cpu, cpu_pmu) && cpu_pmu->reset) + cpu_pmu->reset(NULL); if (cpu_pmu->restore_pm_registers) cpu_pmu->restore_pm_registers((void *)lcpu); - if (cpu_has_active_perf(cpu, cpu_pmu) && cpu_pmu->reset) { + if (cpu_has_active_perf(cpu, cpu_pmu)) { /* * Flip this bit so armpmu_enable knows it needs * to re-enable active counters. */ get_cpu_var(from_idle) = 1; - cpu_pmu->reset(NULL); pmu = &cpu_pmu->pmu; pmu->pmu_enable(pmu); } |