提交 bca3e43c 编写于 作者: I Ionela Voinescu 提交者: Rafael J. Wysocki

ACPI: processor: fix NONE coordination for domain mapping failure

For errors parsing the _PSD domains, a separate domain is returned for
each CPU in the failed _PSD domain with no coordination (as per previous
comment). But contrary to the intention, the code was setting
CPUFREQ_SHARED_TYPE_ALL as coordination type.

Change shared_type to CPUFREQ_SHARED_TYPE_NONE in case of errors parsing
the domain information. The function still returns the error and the caller
is free to bail out the domain initialisation altogether in that case.

Given that both functions return domains with a single CPU, this change
does not affect the functionality, but clarifies the intention.
Signed-off-by: NIonela Voinescu <ionela.voinescu@arm.com>
Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
[ rjw: Subject edit ]
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 55130fb2
...@@ -511,7 +511,7 @@ int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data) ...@@ -511,7 +511,7 @@ int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data)
/* Assume no coordination on any error parsing domain info */ /* Assume no coordination on any error parsing domain info */
cpumask_clear(pr->shared_cpu_map); cpumask_clear(pr->shared_cpu_map);
cpumask_set_cpu(i, pr->shared_cpu_map); cpumask_set_cpu(i, pr->shared_cpu_map);
pr->shared_type = CPUFREQ_SHARED_TYPE_ALL; pr->shared_type = CPUFREQ_SHARED_TYPE_NONE;
} }
out: out:
free_cpumask_var(covered_cpus); free_cpumask_var(covered_cpus);
......
...@@ -709,7 +709,7 @@ int acpi_processor_preregister_performance( ...@@ -709,7 +709,7 @@ int acpi_processor_preregister_performance(
if (retval) { if (retval) {
cpumask_clear(pr->performance->shared_cpu_map); cpumask_clear(pr->performance->shared_cpu_map);
cpumask_set_cpu(i, pr->performance->shared_cpu_map); cpumask_set_cpu(i, pr->performance->shared_cpu_map);
pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL; pr->performance->shared_type = CPUFREQ_SHARED_TYPE_NONE;
} }
pr->performance = NULL; /* Will be set for real in register */ pr->performance = NULL; /* Will be set for real in register */
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册