mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 03:43:03 +00:00
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:
parent
b17d72abef
commit
4a96d743a9
|
@ -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;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int parse_cpu_levels(struct device_node *node, struct lpm_cluster *c)
|
||||
|
|
Loading…
Reference in a new issue