From: Will Deacon Date: Mon, 29 Jul 2019 10:43:48 +0000 (+0100) Subject: drivers/perf: arm_pmu: Fix failure path in PM notifier X-Git-Tag: v5.15~5778^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d7fd70f26039bd4b33444ca47f0e69ce3ae0354;p=platform%2Fkernel%2Flinux-starfive.git drivers/perf: arm_pmu: Fix failure path in PM notifier Handling of the CPU_PM_ENTER_FAILED transition in the Arm PMU PM notifier code incorrectly skips restoration of the counters. Fix the logic so that CPU_PM_ENTER_FAILED follows the same path as CPU_PM_EXIT. Cc: Fixes: da4e4f18afe0f372 ("drivers/perf: arm_pmu: implement CPU_PM notifier") Reported-by: Anders Roxell Acked-by: Lorenzo Pieralisi Signed-off-by: Will Deacon --- diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index 2d06b80..df352b3 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -723,8 +723,8 @@ static int cpu_pm_pmu_notify(struct notifier_block *b, unsigned long cmd, cpu_pm_pmu_setup(armpmu, cmd); break; case CPU_PM_EXIT: - cpu_pm_pmu_setup(armpmu, cmd); case CPU_PM_ENTER_FAILED: + cpu_pm_pmu_setup(armpmu, cmd); armpmu->start(armpmu); break; default: