diff mbox series

[3/3] arm64, topology: enable use of init_cpu_capacity_cppc()

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

Commit Message

Ionela Voinescu May 14, 2021, 9:53 a.m. UTC
Now that the arch topology driver provides a method of setting CPU
capacity values based on information on highest performance from CPPC,
use this functionality on arm64 platforms.

Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
---
 arch/arm64/include/asm/topology.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Catalin Marinas May 14, 2021, 10:35 a.m. UTC | #1
On Fri, May 14, 2021 at 10:53:39AM +0100, Ionela Voinescu wrote:
> Now that the arch topology driver provides a method of setting CPU
> capacity values based on information on highest performance from CPPC,
> use this functionality on arm64 platforms.
> 
> Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Dietmar Eggemann May 14, 2021, 4:17 p.m. UTC | #2
On 14/05/2021 11:53, Ionela Voinescu wrote:

[...]

> +#ifdef CONFIG_ACPI_CPPC_LIB
> +#define arch_init_invariance_cppc init_cpu_capacity_cppc
> +#endif

The prefix `topology_` was meant to indicate that those functions come
from drivers/base/arch_topology.c. You probably refrained from it since

topology_init_cpu_capacity_cppc()

is a pretty long function name ... Still more consistent though.

[...]
Ionela Voinescu May 19, 2021, 9:48 a.m. UTC | #3
On Friday 14 May 2021 at 18:17:00 (+0200), Dietmar Eggemann wrote:
> On 14/05/2021 11:53, Ionela Voinescu wrote:

> 

> [...]

> 

> > +#ifdef CONFIG_ACPI_CPPC_LIB

> > +#define arch_init_invariance_cppc init_cpu_capacity_cppc

> > +#endif

> 

> The prefix `topology_` was meant to indicate that those functions come

> from drivers/base/arch_topology.c. You probably refrained from it since

> 

> topology_init_cpu_capacity_cppc()

> 

> is a pretty long function name ... Still more consistent though.

> 


I'll rename it, thanks!

Ionela.

> [...]

>
diff mbox series

Patch

diff --git a/arch/arm64/include/asm/topology.h b/arch/arm64/include/asm/topology.h
index ec2db3419c41..c6ae6b55789c 100644
--- a/arch/arm64/include/asm/topology.h
+++ b/arch/arm64/include/asm/topology.h
@@ -24,6 +24,10 @@  void update_freq_counters_refs(void);
 #define arch_scale_freq_capacity topology_get_freq_scale
 #define arch_scale_freq_invariant topology_scale_freq_invariant
 
+#ifdef CONFIG_ACPI_CPPC_LIB
+#define arch_init_invariance_cppc init_cpu_capacity_cppc
+#endif
+
 /* Replace task scheduler's default cpu-invariant accounting */
 #define arch_scale_cpu_capacity topology_get_cpu_scale