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

Commit 5170c83e authored by Mahesh Sivasubramanian's avatar Mahesh Sivasubramanian Committed by Srinivas Rao L
Browse files

drivers: cpuidle: lpm-levels: Remove ktime_get from suspend path



The sleep time for suspend is accounted as a part of suspend_prepare and
suspend wake call backs. Moreover the timekeeping framework is suspended
before suspend_enter calls, which causes a warning when called from within
the suspend_enter function.

Remove ktime_get() calls from within the lpm_suspend_enter() callbacks.

Change-Id: Ifff59b5caa387c603719d42a22559da6e97fdd9e
Signed-off-by: default avatarMahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: default avatarSrinivas Rao L <lsrao@codeaurora.org>
parent 7b262653
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1265,7 +1265,6 @@ static int lpm_suspend_enter(suspend_state_t state)
	struct lpm_cpu *lpm_cpu = cluster->cpu;
	const struct cpumask *cpumask = get_cpu_mask(cpu);
	int idx;
	int64_t time = ktime_to_ns(ktime_get());

	for (idx = lpm_cpu->nlevels - 1; idx >= 0; idx--) {

@@ -1277,7 +1276,7 @@ static int lpm_suspend_enter(suspend_state_t state)
		return 0;
	}
	cpu_prepare(cluster, idx, false);
	cluster_prepare(cluster, cpumask, idx, false, time);
	cluster_prepare(cluster, cpumask, idx, false, 0);
	if (idx > 0)
		update_debug_pc_event(CPU_ENTER, idx, 0xdeaffeed,
					0xdeaffeed, false);
@@ -1299,8 +1298,7 @@ static int lpm_suspend_enter(suspend_state_t state)
		update_debug_pc_event(CPU_EXIT, idx, true, 0xdeaffeed,
					false);

	time = ktime_to_ns(ktime_get());
	cluster_unprepare(cluster, cpumask, idx, false, time);
	cluster_unprepare(cluster, cpumask, idx, false, 0);
	cpu_unprepare(cluster, idx, false);
	return 0;
}