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

Commit 95418770 authored by Archana Sathyakumar's avatar Archana Sathyakumar
Browse files

msm-core: Retrieve voltage plan for only cpus listed cpumask



Currently, the implementation assumes that all the clusters have 4 cores
within it. This information overrides the data that is provided by the
userspace. Provide voltage plan update to only those cpus request by the
userspace in cpumask attribute.

Change-Id: I5be720f725919b831acd51591a80e14b2816f21d
Signed-off-by: default avatarArchana Sathyakumar <asathyak@codeaurora.org>
parent 8d4ed1d9
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -457,13 +457,9 @@ static long msm_core_ioctl(struct file *file, unsigned int cmd,
			pr_err("Userspace power update failed with %ld\n", ret);
		break;
	case EA_VOLT:
		for (i = 0; i < MAX_CORES_PER_CLUSTER; i++, cpumask >>= 1) {
			if (!(cpumask & 0x01))
				continue;

			mpidr |= i;
		for (i = 0; cpumask > 0; i++, cpumask >>= 1) {
			for_each_possible_cpu(cpu) {
				if (cpu_logical_map(cpu) == mpidr)
				if (cpu_logical_map(cpu) == (mpidr | i))
					break;
			}
		}