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

Commit 9e69bf60 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm_11ad: update affinity to start from the first golden core"

parents a29405e3 855d4315
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -950,20 +950,19 @@ static int msm_11ad_ssr_init(struct msm11ad_ctx *ctx)

static void msm_11ad_init_cpu_boost(struct msm11ad_ctx *ctx)
{
	unsigned int minfreq = 0, maxfreq = 0, freq;
	unsigned int cpu0freq, freq;
	int i, boost_cpu = 0;

	cpu0freq = cpufreq_quick_get_max(0);
	for_each_possible_cpu(i) {
		freq = cpufreq_quick_get_max(i);
		if (freq > maxfreq) {
			maxfreq = freq;
		if (freq > cpu0freq) {
			boost_cpu = i;
			break;
		}
		if (!minfreq || freq < minfreq)
			minfreq = freq;
	}

	if (minfreq != maxfreq) {
	if (boost_cpu) {
		/*
		 * use first 2 big cores for boost, to be compatible with WLAN
		 * which assigns big cores from the last index