diff mbox series

[v2,1/3] x86, ACPI: rename init_freq_invariance_cppc to arch_init_invariance_cppc

Message ID 20210824105651.28660-2-ionela.voinescu@arm.com
State Superseded
Headers show
Series [v2,1/3] x86, ACPI: rename init_freq_invariance_cppc to arch_init_invariance_cppc | expand

Commit Message

Ionela Voinescu Aug. 24, 2021, 10:56 a.m. UTC
init_freq_invariance_cppc() was called in acpi_cppc_processor_probe(),
after CPU performance information and controls were populated from the
per-cpu _CPC objects.

But these _CPC objects provide information that helps with both CPU
(u-arch) and frequency invariance. Therefore, change the function name
to a more generic one, while adding the arch_ prefix, as this function
is expected to be defined differently by different architectures.

Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
Tested-by: Valentin Schneider <valentin.schneider@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Giovanni Gherdovich <ggherdovich@suse.cz>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
---
 arch/x86/include/asm/topology.h | 2 +-
 drivers/acpi/cppc_acpi.c        | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Rafael J. Wysocki Aug. 25, 2021, 5:48 p.m. UTC | #1
On Tue, Aug 24, 2021 at 12:57 PM Ionela Voinescu
<ionela.voinescu@arm.com> wrote:
>

> init_freq_invariance_cppc() was called in acpi_cppc_processor_probe(),

> after CPU performance information and controls were populated from the

> per-cpu _CPC objects.

>

> But these _CPC objects provide information that helps with both CPU

> (u-arch) and frequency invariance. Therefore, change the function name

> to a more generic one, while adding the arch_ prefix, as this function

> is expected to be defined differently by different architectures.

>

> Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>

> Tested-by: Valentin Schneider <valentin.schneider@arm.com>

> Cc: Thomas Gleixner <tglx@linutronix.de>

> Cc: Ingo Molnar <mingo@redhat.com>

> Cc: Giovanni Gherdovich <ggherdovich@suse.cz>

> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>


Acked-by: Rafael J. Wysocki <rafael@kernel.org>


> ---

>  arch/x86/include/asm/topology.h | 2 +-

>  drivers/acpi/cppc_acpi.c        | 6 +++---

>  2 files changed, 4 insertions(+), 4 deletions(-)

>

> diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h

> index 9239399e5491..61d73013cab8 100644

> --- a/arch/x86/include/asm/topology.h

> +++ b/arch/x86/include/asm/topology.h

> @@ -220,7 +220,7 @@ static inline void arch_set_max_freq_ratio(bool turbo_disabled)

>

>  #ifdef CONFIG_ACPI_CPPC_LIB

>  void init_freq_invariance_cppc(void);

> -#define init_freq_invariance_cppc init_freq_invariance_cppc

> +#define arch_init_invariance_cppc init_freq_invariance_cppc

>  #endif

>

>  #endif /* _ASM_X86_TOPOLOGY_H */

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

> index a4d4eebba1da..c211d77310e8 100644

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

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

> @@ -660,8 +660,8 @@ static bool is_cppc_supported(int revision, int num_ent)

>   *     }

>   */

>

> -#ifndef init_freq_invariance_cppc

> -static inline void init_freq_invariance_cppc(void) { }

> +#ifndef arch_init_invariance_cppc

> +static inline void arch_init_invariance_cppc(void) { }

>  #endif

>

>  /**

> @@ -826,7 +826,7 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)

>                 goto out_free;

>         }

>

> -       init_freq_invariance_cppc();

> +       arch_init_invariance_cppc();

>

>         kfree(output.pointer);

>         return 0;

> --

> 2.29.2.dirty

>
diff mbox series

Patch

diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 9239399e5491..61d73013cab8 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -220,7 +220,7 @@  static inline void arch_set_max_freq_ratio(bool turbo_disabled)
 
 #ifdef CONFIG_ACPI_CPPC_LIB
 void init_freq_invariance_cppc(void);
-#define init_freq_invariance_cppc init_freq_invariance_cppc
+#define arch_init_invariance_cppc init_freq_invariance_cppc
 #endif
 
 #endif /* _ASM_X86_TOPOLOGY_H */
diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index a4d4eebba1da..c211d77310e8 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -660,8 +660,8 @@  static bool is_cppc_supported(int revision, int num_ent)
  *	}
  */
 
-#ifndef init_freq_invariance_cppc
-static inline void init_freq_invariance_cppc(void) { }
+#ifndef arch_init_invariance_cppc
+static inline void arch_init_invariance_cppc(void) { }
 #endif
 
 /**
@@ -826,7 +826,7 @@  int acpi_cppc_processor_probe(struct acpi_processor *pr)
 		goto out_free;
 	}
 
-	init_freq_invariance_cppc();
+	arch_init_invariance_cppc();
 
 	kfree(output.pointer);
 	return 0;