Re: [PATCH 1/2] arch_topology: Relocate cpu_scale to topology.[h|c]
From: Christian Loehle
Date: Fri Apr 25 2025 - 12:31:21 EST
On 4/19/25 03:55, Ricardo Neri wrote:
> arch_topology.c provides functionality to parse and scale CPU capacity. It
> also provides a corresponding sysfs interface. Some architectures parse
> and scale CPU capacity differently as per their own needs. On Intel
> processors, for instance, it is responsibility of the Intel P-state driver.
>
> Relocate the implementation of that interface to a common location in
> topology.c. Architectures can use the interface and populate it using their
> own mechanisms.
>
> An alternative approach would be to compile arch_topology.c even if not
> needed only to get this interface. This approach would create duplicated
> and conflicting functionality and data structures.
>
> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>
Maybe an FYI for the non-x86 folks, this doesn't break anything on the
usual arm64 setup:
Tested-by: Christian Loehle <christian.loehle@xxxxxxx>