]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64/amu: Use capacity_ref_freq() to set AMU ratio
authorVincent Guittot <vincent.guittot@linaro.org>
Mon, 11 Dec 2023 10:48:55 +0000 (11:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:42 +0000 (16:28 +0200)
commit68df021d3cfa7e0584bfee7d2bd97a0b041eabe6
treefb27e92052121d01873998882ade74c20169ab39
parentcf4faefd3a7b787d2c864b118a4ac4b1d5f69f6a
arm64/amu: Use capacity_ref_freq() to set AMU ratio

commit 1f023007f5e782bda19ad9104830c404fd622c5d upstream.

Use the new capacity_ref_freq() method to set the ratio that is used by AMU for
computing the arch_scale_freq_capacity().
This helps to keep everything aligned using the same reference for
computing CPUs capacity.

The default value of the ratio (stored in per_cpu(arch_max_freq_scale))
ensures that arch_scale_freq_capacity() returns max capacity until it is
set to its correct value with the cpu capacity and capacity_ref_freq().

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20231211104855.558096-8-vincent.guittot@linaro.org
Stable-dep-of: e37617c8e53a ("sched/fair: Fix frequency selection for non-invariant case")
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/topology.c
drivers/base/arch_topology.c
include/linux/arch_topology.h