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

Commit 687d4ad9 authored by Lina Iyer's avatar Lina Iyer
Browse files

drivers: cpuidle: lpm-levels: Do not set affinity level for 0 mode id



A PSCI ID of zero doesn't require any setting from the firmware. In this
case, incrementing the affinity level would be incorrect, especially for
a single core system where the CPU and Cluster states are linearized.
The Sleep driver in the kernel needs to different between CPU/Cluster
states to send System votes through before sleep.

Do not increment affinity level when PSCI ID is zero.

Change-Id: I4739ee1ac893d30e5ab5f24b1c388ef58acda06a
Signed-off-by: default avatarMahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
parent 90950c75
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1244,7 +1244,6 @@ int get_cluster_id(struct lpm_cluster *cluster, int *aff_lvl)

		state_id |= (level->psci_id & cluster->psci_mode_mask)
					<< cluster->psci_mode_shift;
		(*aff_lvl)++;

		/*
		 * We may have updated the broadcast timers, update
@@ -1252,6 +1251,8 @@ int get_cluster_id(struct lpm_cluster *cluster, int *aff_lvl)
		 */
		if (level->notify_rpm)
			system_sleep_update_wakeup();
		if (level->psci_id)
			(*aff_lvl)++;
	}
unlock_and_return:
	spin_unlock(&cluster->sync_lock);