Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d42a3dae authored by Neil Leeder's avatar Neil Leeder
Browse files

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: default avatarNeil Leeder <nleeder@codeaurora.org>
parent fd64280e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ static char *descriptions =
	"10 Perf: arm64: tracectr: initialize counts after hotplug\n"
	"11 Perf: arm64: Refine disable/enable in tracecounters\n"
	"12 Perf: arm64: fix disable of pmu irq during hotplug\n"
	"13 Perf: arm64: restore registers after reset\n"
;

static ssize_t desc_read(struct file *fp, char __user *buf,
+3 −2
Original line number Diff line number Diff line
@@ -1556,15 +1556,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->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->reset) {
		if (cpu_has_active_perf(cpu)) {
			/*
			 * 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);
		}