Skip to contentSkip to conversation

ACPI: processor: Drop duplicate setting of shared_cpu_map

PATCH Applied Punit Agrawal 2 participants 2 messages Nov 24, 2020 – Nov 25, 2020 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: processor: Drop duplicate setting of shared_cpu_map

'shared_cpu_map', stored as part of the per-processor acpi_processor_performance structre, is used to store cpus that share a performance domain. By definition it contains the owning cpu.

While building the 'shared_cpu_map' it is being set twice - once while initialising the performance domains and again when matching cpus belonging to the same domain.

Drop the unnecessary initialisation.

---
 drivers/acpi/processor_perflib.c | 1 -
 1 file changed, 1 deletion(-)
drivers/acpi/processor_perflib.c +0 -1
index b04a68950ff1..b0d320f18163 100644
@@ -616,7 +616,6 @@ int acpi_processor_preregister_performance(
 			continue;
 
 		pr->performance = per_cpu_ptr(performance, i);
-		cpumask_set_cpu(i, pr->performance->shared_cpu_map);
 		pdomain = &(pr->performance->domain_info);
 		if (acpi_processor_get_psd(pr->handle, pdomain)) {
 			retval = -EINVAL;
Signature · 1 line
2.29.2
maintainer Applied
#1 lore raw
Quoted 21 lines · Punit Agrawal

'shared_cpu_map', stored as part of the per-processor acpi_processor_performance structre, is used to store cpus that share a performance domain. By definition it contains the owning cpu.

While building the 'shared_cpu_map' it is being set twice - once while initialising the performance domains and again when matching cpus belonging to the same domain.

Drop the unnecessary initialisation.

---
 drivers/acpi/processor_perflib.c | 1 -
 1 file changed, 1 deletion(-)
drivers/acpi/processor_perflib.c +0 -0
index b04a68950ff1..b0d320f18163 100644

drivers/acpi/processor_perflib.c int acpi_processor_preregister_performance(

Quoted 8 lines
drivers/acpi/processor_perflib.c +0 -2
@@ -616,7 +616,6 @@ int acpi_processor_preregister_performance(
                        continue;
 
                pr->performance = per_cpu_ptr(performance, i);
-               cpumask_set_cpu(i, pr->performance->shared_cpu_map);
                pdomain = &(pr->performance->domain_info);
                if (acpi_processor_get_psd(pr->handle, pdomain)) {
                        retval = -EINVAL;
--

Applied as 5.11 material, thanks!