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

Commit 5f92ec65 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "lpm-levels: Return from idle enter for negative mode"

parents fb2e8b97 3b2e3dcd
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1542,11 +1542,14 @@ static int lpm_cpuidle_enter(struct cpuidle_device *dev,
		struct cpuidle_driver *drv, int idx)
{
	struct lpm_cluster *cluster = per_cpu(cpu_cluster, dev->cpu);
	bool success = true;
	bool success = false;
	const struct cpumask *cpumask = get_cpu_mask(dev->cpu);
	int64_t start_time = ktime_to_ns(ktime_get()), end_time;
	struct power_params *pwr_params;

	if (idx < 0)
		return -EINVAL;

	pwr_params = &cluster->cpu->levels[idx].pwr;
	sched_set_cpu_cstate(smp_processor_id(), idx + 1,
		pwr_params->energy_overhead, pwr_params->latency_us);
@@ -1559,7 +1562,7 @@ static int lpm_cpuidle_enter(struct cpuidle_device *dev,
	trace_cpu_idle_enter(idx);
	lpm_stats_cpu_enter(idx, start_time);

	if (need_resched() || (idx < 0))
	if (need_resched())
		goto exit;

	BUG_ON(!use_psci);