]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arch_topology: Relocate cpu_scale to topology.[h|c]
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>
Sat, 19 Apr 2025 02:55:03 +0000 (19:55 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 May 2025 19:56:55 +0000 (21:56 +0200)
commit6bceea7a1e076ef9d71b20d8dda2f7dc52bd34d2
tree34b9da0f1f4fe0d0bcf96ebcb77731fdee87b3f7
parent4854649b1fb43968615e0374d9d59580093ac67f
arch_topology: Relocate cpu_scale to topology.[h|c]

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@linux.intel.com>
Tested-by: Christian Loehle <christian.loehle@arm.com>
Link: https://patch.msgid.link/20250419025504.9760-2-ricardo.neri-calderon@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/arch_topology.c
drivers/base/topology.c
include/linux/arch_topology.h
include/linux/topology.h