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: Mahesh Sivasubramanian <msivasub@codeaurora.org>
This commit is contained in:
Mahesh Sivasubramanian 2015-01-15 14:55:51 -07:00 committed by Srinivas Rao L
parent b17d72abef
commit 4a96d743a9

View file

@ -560,7 +560,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) {
@ -576,24 +575,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)