diff mbox series

ACPI: processor: Drop duplicate setting of shared_cpu_map

Message ID 20201123235951.96243-1-punitagrawal@gmail.com
State Accepted
Commit 55130fb22a1c396139c3da46f939bf5a6a92095e
Headers show
Series ACPI: processor: Drop duplicate setting of shared_cpu_map | expand

Commit Message

Punit Agrawal Nov. 23, 2020, 11:59 p.m. UTC
'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.

Signed-off-by: Punit Agrawal <punitagrawal@gmail.com>
---
 drivers/acpi/processor_perflib.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Rafael J. Wysocki Nov. 25, 2020, 3:47 p.m. UTC | #1
On Tue, Nov 24, 2020 at 1:00 AM Punit Agrawal <punitagrawal@gmail.com> wrote:
>

> '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.

>

> Signed-off-by: Punit Agrawal <punitagrawal@gmail.com>

> ---

>  drivers/acpi/processor_perflib.c | 1 -

>  1 file changed, 1 deletion(-)

>

> diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c

> index b04a68950ff1..b0d320f18163 100644

> --- a/drivers/acpi/processor_perflib.c

> +++ b/drivers/acpi/processor_perflib.c

> @@ -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!
diff mbox series

Patch

diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index b04a68950ff1..b0d320f18163 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -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;