[PATCH v2 0/2] cpufreq: CPPC: Rework FIE warning prints and cppc_scale_freq_tick()

Jie Zhan zhanjie9 at hisilicon.com
Mon Sep 15 19:58:37 PDT 2025


A kindly ping on this.
Some feedback would be nice if anyone is not on holiday ;)

Jie

On 8/28/2025 7:02 PM, Jie Zhan wrote:
> Reading performance feedback counters on offline or low-power idle CPUs may
> return 0, which is interpreted as -EFAULT.
> 
> This leads to two issues related to the CPPC FIE:
> 
> 1. When booting a subset of CPUs in policy->related_cpus (some CPUs under
> the cpufreq policy is offline), there are warnings of "failed to read perf
> counters for cpu" during the CPPC FIE initialization.
> 
> 2. On our platform with the CPC regs in System Memory and a power-down idle
> state enabled, if the CPPC FIE is registered successfully, there are
> repeated warnings of "failed to read perf counters" because
> cppc_scale_freq_workfn() is trying to access the counters of remote CPUs
> that enters the idle state.
> 
> To solve the above issues:
> 
> Patch 1 removes the warning when the CPPC FIE initialization fails to read
> counters on offline CPUs and changes the log leve to debug.  This can be
> applied separately.
> 
> Patch 2 moves the update of FIE arch_freq_scale into ticks for non-PCC regs
> and maintains the existing mechanism for PCC regs, such that reading
> counters would be triggered on the local CPU only.  This inherently solves
> the issue in [1].  We have tested this on Kunpeng SoCs with the CPC regs
> both in System Memory and FFH.  More tests on other platforms are welcome
> though.
> [1] https://lore.kernel.org/linux-pm/20250730032312.167062-3-yubowen8@huawei.com/
> 
> Changelog:
> 
> v2:
> - Update the cover letter and the commit log based on v1 discussion
> - Update FIE arch_freq_scale in ticks for non-PCC regs
> 
> v1:
> https://lore.kernel.org/linux-pm/20250730032312.167062-1-yubowen8@huawei.com/
> 
> Jie Zhan (2):
>   cpufreq: CPPC: Don't warn if FIE init fails to read counters
>   cpufreq: CPPC: Update FIE arch_freq_scale in ticks for non-PCC regs
> 
>  drivers/cpufreq/cppc_cpufreq.c | 64 +++++++++++++++++++++-------------
>  1 file changed, 39 insertions(+), 25 deletions(-)
> 



More information about the linux-arm-kernel mailing list