[PATCH v6 0/2] PM / devfreq: Add HiSilicon uncore frequency scaling driver

Jie Zhan zhanjie9 at hisilicon.com
Tue Jul 15 23:48:15 PDT 2025



On 16/07/2025 14:45, Chanwoo Choi wrote:
> Hi Jie,
> 
> Yes. I'll send pull request to be merged into v6.17-rc1 within this week.

Sure, thanks!

> 
> 
> Best Regards,
> Chanwoo Choi
> 
> 2025년 7월 16일 (수) 오후 3:33, Jie Zhan <zhanjie9 at hisilicon.com <mailto:zhanjie9 at hisilicon.com>>님이 작성:
> 
>     Hi Chanwoo,
> 
>     A quick check. Is this series queueing up for v6.17-rc1?
> 
>     Regards,
>     Jie
> 
>     On 02/07/2025 11:21, Chanwoo Choi wrote:
>     > Hi,
>     >
>     > I'm sorry for late review. I'll review and then merge until this week.
>     >
>     > Best Regards,
>     > Chanwoo Choi
>     >
>     > 2025년 7월 2일 (수) 오전 11:37, Jie Zhan <zhanjie9 at hisilicon.com <mailto:zhanjie9 at hisilicon.com> <mailto:zhanjie9 at hisilicon.com <mailto:zhanjie9 at hisilicon.com>>>님이 작성:
>     >
>     >     Hi devfreq maintainers,
>     >
>     >     A kindly ping on this series.
>     >     I believe it's in a good shape now.
>     >
>     >     Jie
>     >
>     >     On 23/06/2025 22:33, Jie Zhan wrote:
>     >     > 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.
>     >     >
>     >     > Changelog:
>     >     >
>     >     > v6:
>     >     > Consolidate hisi_uncore_init_pcc_chan() related stuff:
>     >     > - Move devm_mutex_init() to hisi_uncore_init_pcc_chan()
>     >     > - Move devm_add_action_or_reset() into hisi_uncore_request_pcc_chan()
>     >     >
>     >     > v5:
>     >     > https://lore.kernel.org/all/20250619151456.3328624-1-zhanjie9@hisilicon.com/ <https://lore.kernel.org/all/20250619151456.3328624-1-zhanjie9@hisilicon.com/> <https://lore.kernel.org/all/20250619151456.3328624-1-zhanjie9@hisilicon.com/ <https://lore.kernel.org/all/20250619151456.3328624-1-zhanjie9@hisilicon.com/>>
>     >     > - Comment more on error code related stuff about
>     >     >   hisi_uncore_mark_related_cpus(), and return failure early on errors
>     >     >   except for -EINVAL, which indicates possibly broken firmware.
>     >     > - Separate error prints apart for two cases in hisi_platform_gov_handler()
>     >     > - Make the 'related_cpus' sysfs ABI description more generic
>     >     > - Some coding style cleanups and typo fixes
>     >     >
>     >     > v4:
>     >     > https://lore.kernel.org/linux-pm/20250530081722.280776-1-zhanjie9@hisilicon.com/ <https://lore.kernel.org/linux-pm/20250530081722.280776-1-zhanjie9@hisilicon.com/> <https://lore.kernel.org/linux-pm/20250530081722.280776-1-zhanjie9@hisilicon.com/ <https://lore.kernel.org/linux-pm/20250530081722.280776-1-zhanjie9@hisilicon.com/>>
>     >     > - Allow devfreq core to accept device-specific sysfs ABIs
>     >     > - Replace custom sysfs attrs with dev_groups and let the devfreq core
>     >     >   manage it
>     >     > - Update 'related_cpus' description in the devfreq ABI doc
>     >     > - Remove COMPILE_TEST in Kconfig as the mailbox_client.h doesn't support
>     >     >   this yet
>     >     > - Replace dev_err() with dev_err_probe() during drv->probe()
>     >     > - Replace mutex_init() with devm_mutex_init() to warn on UAF
>     >     > - Replace uncore->dev with dev in some places to make code a bit shorter
>     >     > - Remove redundant uncore->pchan check in hisi_uncore_free_pcc_chan()
>     >     > - Use __free() to let compiler release temporary memory
>     >     > - Clean up the error handling and redundant 'status = 0' in
>     >     >   hisi_uncore_send_cmd()
>     >     > - Some coding style cleanup
>     >     >
>     >     > v3:
>     >     > https://lore.kernel.org/linux-pm/20250522031701.1912458-1-zhanjie9@hisilicon.com/ <https://lore.kernel.org/linux-pm/20250522031701.1912458-1-zhanjie9@hisilicon.com/> <https://lore.kernel.org/linux-pm/20250522031701.1912458-1-zhanjie9@hisilicon.com/ <https://lore.kernel.org/linux-pm/20250522031701.1912458-1-zhanjie9@hisilicon.com/>>
>     >     > - Remove redundant resource freeing processes when drv->probe() fails as
>     >     >   they're already handled by devm
>     >     >
>     >     > v2:
>     >     > https://lore.kernel.org/linux-pm/20250520074120.4187096-1-zhanjie9@hisilicon.com/ <https://lore.kernel.org/linux-pm/20250520074120.4187096-1-zhanjie9@hisilicon.com/> <https://lore.kernel.org/linux-pm/20250520074120.4187096-1-zhanjie9@hisilicon.com/ <https://lore.kernel.org/linux-pm/20250520074120.4187096-1-zhanjie9@hisilicon.com/>>
>     >     > - Make devm manage the release sequence, remove drv->remove()
>     >     > - Warn on !uncore or !uncore->pchan as they're no longer expected
>     >     > - Remove ioremap of pcc shared memory because it's done by the pcc driver
>     >     > - Fix compiler warning of discarding 'const'
>     >     > - Minor trivial coding style changes
>     >     >
>     >     > v1:
>     >     > https://lore.kernel.org/linux-pm/20250506021434.944386-1-zhanjie9@hisilicon.com/ <https://lore.kernel.org/linux-pm/20250506021434.944386-1-zhanjie9@hisilicon.com/> <https://lore.kernel.org/linux-pm/20250506021434.944386-1-zhanjie9@hisilicon.com/ <https://lore.kernel.org/linux-pm/20250506021434.944386-1-zhanjie9@hisilicon.com/>>
>     >     >
>     >     > Jie Zhan (2):
>     >     >   PM / devfreq: Allow devfreq driver to add custom sysfs ABIs
>     >     >   PM / devfreq: Add HiSilicon uncore frequency scaling driver
>     >     >
>     >     >  Documentation/ABI/testing/sysfs-class-devfreq |   9 +
>     >     >  drivers/devfreq/Kconfig                       |  11 +
>     >     >  drivers/devfreq/Makefile                      |   1 +
>     >     >  drivers/devfreq/devfreq.c                     |   1 +
>     >     >  drivers/devfreq/hisi_uncore_freq.c            | 658 ++++++++++++++++++
>     >     >  include/linux/devfreq.h                       |   4 +
>     >     >  6 files changed, 684 insertions(+)
>     >     >  create mode 100644 drivers/devfreq/hisi_uncore_freq.c
>     >     >
>     >
> 



More information about the linux-arm-kernel mailing list