PM / devfreq: Add HiSilicon uncore frequency scaling driver

Add the HiSilicon uncore frequency scaling driver for Kunpeng SoCs based on
the devfreq framework.  The uncore domain contains shared computing
resources, including system interconnects and L3 cache.  The uncore
frequency significantly impacts the system-wide performance as well as
power consumption.  This driver adds support for runtime management of
uncore frequency from kernel and userspace.  The main function includes
setting and getting frequencies, changing frequency scaling policies, and
querying the list of CPUs whose performance is significantly related to
this uncore frequency domain, etc.  The driver communicates with a platform
controller through an ACPI PCC mailbox to take the actual actions of
frequency scaling.

Co-developed-by: Lifeng Zheng <zhenglifeng1@huawei.com>
Signed-off-by: Lifeng Zheng <zhenglifeng1@huawei.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Jie Zhan <zhanjie9@hisilicon.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Link: https://patchwork.kernel.org/project/linux-pm/patch/20250623143401.4095045-3-zhanjie9@hisilicon.com/
This commit is contained in:
Jie Zhan
2025-07-14 20:23:57 +09:00
committed by Chanwoo Choi
parent 45b9d1da6c
commit 7da2fdaaa1
4 changed files with 679 additions and 0 deletions
@@ -132,3 +132,12 @@ Description:
A list of governors that support the node: A list of governors that support the node:
- simple_ondemand - simple_ondemand
What: /sys/class/devfreq/.../related_cpus
Date: June 2025
Contact: Linux power management list <linux-pm@vger.kernel.org>
Description: The list of CPUs whose performance is closely related to the
frequency of this devfreq domain.
This file is only present if a specific devfreq device is
closely associated with a subset of CPUs.
+11
View File
@@ -90,6 +90,17 @@ config ARM_EXYNOS_BUS_DEVFREQ
and adjusts the operating frequencies and voltages with OPP support. and adjusts the operating frequencies and voltages with OPP support.
This does not yet operate with optimal voltages. This does not yet operate with optimal voltages.
config ARM_HISI_UNCORE_DEVFREQ
tristate "HiSilicon uncore DEVFREQ Driver"
depends on ACPI && ACPI_PPTT && PCC
select DEVFREQ_GOV_PERFORMANCE
select DEVFREQ_GOV_USERSPACE
help
This adds a DEVFREQ driver that manages uncore frequency scaling for
HiSilicon Kunpeng SoCs. This enables runtime management of uncore
frequency scaling from kernel and userspace. The uncore domain
contains system interconnects and L3 cache.
config ARM_IMX_BUS_DEVFREQ config ARM_IMX_BUS_DEVFREQ
tristate "i.MX Generic Bus DEVFREQ Driver" tristate "i.MX Generic Bus DEVFREQ Driver"
depends on ARCH_MXC || COMPILE_TEST depends on ARCH_MXC || COMPILE_TEST
+1
View File
@@ -9,6 +9,7 @@ obj-$(CONFIG_DEVFREQ_GOV_PASSIVE) += governor_passive.o
# DEVFREQ Drivers # DEVFREQ Drivers
obj-$(CONFIG_ARM_EXYNOS_BUS_DEVFREQ) += exynos-bus.o obj-$(CONFIG_ARM_EXYNOS_BUS_DEVFREQ) += exynos-bus.o
obj-$(CONFIG_ARM_HISI_UNCORE_DEVFREQ) += hisi_uncore_freq.o
obj-$(CONFIG_ARM_IMX_BUS_DEVFREQ) += imx-bus.o obj-$(CONFIG_ARM_IMX_BUS_DEVFREQ) += imx-bus.o
obj-$(CONFIG_ARM_IMX8M_DDRC_DEVFREQ) += imx8m-ddrc.o obj-$(CONFIG_ARM_IMX8M_DDRC_DEVFREQ) += imx8m-ddrc.o
obj-$(CONFIG_ARM_MEDIATEK_CCI_DEVFREQ) += mtk-cci-devfreq.o obj-$(CONFIG_ARM_MEDIATEK_CCI_DEVFREQ) += mtk-cci-devfreq.o
File diff suppressed because it is too large Load Diff