Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Ionela Voinescu <ionela.voinescu@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Ionela Voinescu and committed by
Rafael J. Wysocki
bca3e43c 55130fb2

+2 -2
+1 -1
drivers/acpi/cppc_acpi.c
··· 511 511 /* Assume no coordination on any error parsing domain info */ 512 512 cpumask_clear(pr->shared_cpu_map); 513 513 cpumask_set_cpu(i, pr->shared_cpu_map); 514 - pr->shared_type = CPUFREQ_SHARED_TYPE_ALL; 514 + pr->shared_type = CPUFREQ_SHARED_TYPE_NONE; 515 515 } 516 516 out: 517 517 free_cpumask_var(covered_cpus);
+1 -1
drivers/acpi/processor_perflib.c
··· 709 709 if (retval) { 710 710 cpumask_clear(pr->performance->shared_cpu_map); 711 711 cpumask_set_cpu(i, pr->performance->shared_cpu_map); 712 - pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL; 712 + pr->performance->shared_type = CPUFREQ_SHARED_TYPE_NONE; 713 713 } 714 714 pr->performance = NULL; /* Will be set for real in register */ 715 715 }