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

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

Merge "sched: WALT: introduce a struct with load information for schedutil" into msm-4.9

parents 2336de36 17a15f82
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -1754,6 +1754,25 @@ static inline unsigned long cpu_util(int cpu)
	return __cpu_util(cpu, 0);
}

struct sched_walt_cpu_load {
	unsigned long prev_window_util;
	unsigned long nl;
	unsigned long pl;
};

static inline unsigned long
cpu_util_freq(int cpu, struct sched_walt_cpu_load *walt_load)
{
	unsigned long util = cpu_util(cpu);

#ifdef CONFIG_SCHED_WALT
	if (walt_load)
		walt_load->prev_window_util = util;
#endif

	return util;
}

#endif

#ifdef CONFIG_CPU_FREQ_GOV_SCHED