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

Commit 855d4315 authored by Alexei Avshalom Lazar's avatar Alexei Avshalom Lazar
Browse files

msm_11ad: update affinity to start from the first golden core



Currently the first fastest core is chosen for affinity, in some
cases there are three clusters and the last cluster (the fastest)
include only one core.
In this case we need to choose the first core in the second
cluster to be able to support a case of multiple interrupt lines.

Change-Id: I1ad0c569474fdcfe657bc7b9ab2f363f36e0a0db
Signed-off-by: default avatarAlexei Avshalom Lazar <ailizaro@codeaurora.org>
parent 07b47619
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