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

Commit e35966af authored by Mahesh Sivasubramanian's avatar Mahesh Sivasubramanian Committed by Matt Wagantall
Browse files

cpuidle: lpm-levels-of: Support for partial goods



On targets, where some hardware CPUs are non functional, the bootloader
might prevent that CPU from being brought out of reset and remove it from
list of supported CPUs. To account for these scenarios, the cpuidle driver
shouldn't throw a error when a CPU phandle doesn't map to a corresponding
logical CPU id.

CRs-fixed: 756327
Change-Id: Ie11c078fb54028fcc3ae973a9cf9fd6d685d295c
Signed-off-by: default avatarMahesh Sivasubramanian <msivasub@codeaurora.org>
parent 7bd75c97
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -493,7 +493,6 @@ static int get_cpumask_for_node(struct device_node *node, struct cpumask *mask)
	struct device_node *cpu_node;
	int cpu;
	int idx = 0;
	bool found = false;

	cpu_node = of_parse_phandle(node, "qcom,cpu", idx++);
	if (!cpu_node) {
@@ -509,24 +508,16 @@ static int get_cpumask_for_node(struct device_node *node, struct cpumask *mask)
	}

	while (cpu_node) {
		found = false;
		for_each_possible_cpu(cpu) {
			if (of_get_cpu_node(cpu, NULL) == cpu_node) {
				cpumask_set_cpu(cpu, mask);
				found = true;
				break;
			}
		}
		if (!found)
			pr_crit("Unable to find CPU node for %s\n",
					cpu_node->full_name);

		cpu_node = of_parse_phandle(node, "qcom,cpu", idx++);
	}

	if (!cpumask_empty(mask))
	return 0;
	return -EINVAL;
}

static int parse_cpu_levels(struct device_node *node, struct lpm_cluster *c)