mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cpufreq: Add debug print for current frequency in __cpufreq_driver_target()
@ 2026-01-29 12:18 Pengjie Zhang
  2026-01-30  6:27 ` Viresh Kumar
  2026-03-03 11:48 ` zhangpengjie (A)
  0 siblings, 2 replies; 4+ messages in thread
From: Pengjie Zhang @ 2026-01-29 12:18 UTC (permalink / raw)
  To: rafael, viresh.kumar
  Cc: linux-pm, linux-kernel, zhanjie9, zhenglifeng1, lihuisong,
	yubowen8, linhongye, linuxarm, jonathan.cameron, zhangpengjie2,
	wangzhi12

Include policy->cur in the debug message to explicitly show the frequency
transition (from current to target).

Signed-off-by: Pengjie Zhang <zhangpengjie2@huawei.com>
---
 drivers/cpufreq/cpufreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 4472bb1ec83c..b3d2d2e0c864 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2361,8 +2361,8 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
 	target_freq = __resolve_freq(policy, target_freq, policy->min,
 				     policy->max, relation);
 
-	pr_debug("target for CPU %u: %u kHz, relation %u, requested %u kHz\n",
-		 policy->cpu, target_freq, relation, old_target_freq);
+	pr_debug("CPU %u: cur %u kHz -> target %u kHz (req %u kHz, rel %u)\n",
+		policy->cpu, policy->cur, target_freq, old_target_freq, relation);
 
 	/*
 	 * This might look like a redundant call as we are checking it again
-- 
2.33.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cpufreq: Add debug print for current frequency in __cpufreq_driver_target()
  2026-01-29 12:18 [PATCH] cpufreq: Add debug print for current frequency in __cpufreq_driver_target() Pengjie Zhang
@ 2026-01-30  6:27 ` Viresh Kumar
  2026-03-05 14:47   ` Rafael J. Wysocki
  2026-03-03 11:48 ` zhangpengjie (A)
  1 sibling, 1 reply; 4+ messages in thread
From: Viresh Kumar @ 2026-01-30  6:27 UTC (permalink / raw)
  To: Pengjie Zhang
  Cc: rafael, linux-pm, linux-kernel, zhanjie9, zhenglifeng1,
	lihuisong, yubowen8, linhongye, linuxarm, jonathan.cameron,
	wangzhi12

On 29-01-26, 20:18, Pengjie Zhang wrote:
> Include policy->cur in the debug message to explicitly show the frequency
> transition (from current to target).
> 
> Signed-off-by: Pengjie Zhang <zhangpengjie2@huawei.com>
> ---
>  drivers/cpufreq/cpufreq.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 4472bb1ec83c..b3d2d2e0c864 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -2361,8 +2361,8 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
>  	target_freq = __resolve_freq(policy, target_freq, policy->min,
>  				     policy->max, relation);
>  
> -	pr_debug("target for CPU %u: %u kHz, relation %u, requested %u kHz\n",
> -		 policy->cpu, target_freq, relation, old_target_freq);
> +	pr_debug("CPU %u: cur %u kHz -> target %u kHz (req %u kHz, rel %u)\n",
> +		policy->cpu, policy->cur, target_freq, old_target_freq, relation);
>  
>  	/*
>  	 * This might look like a redundant call as we are checking it again

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cpufreq: Add debug print for current frequency in __cpufreq_driver_target()
  2026-01-29 12:18 [PATCH] cpufreq: Add debug print for current frequency in __cpufreq_driver_target() Pengjie Zhang
  2026-01-30  6:27 ` Viresh Kumar
@ 2026-03-03 11:48 ` zhangpengjie (A)
  1 sibling, 0 replies; 4+ messages in thread
From: zhangpengjie (A) @ 2026-03-03 11:48 UTC (permalink / raw)
  To: rafael
  Cc: linux-pm, linux-kernel, zhanjie9, zhenglifeng1, lihuisong,
	yubowen8, linhongye, linuxarm, jonathan.cameron, wangzhi12,
	viresh.kumar

Can it be applied, please?

Best Regards,
Pengjie Zhang

On 1/29/2026 8:18 PM, Pengjie Zhang wrote:
> Include policy->cur in the debug message to explicitly show the frequency
> transition (from current to target).
>
> Signed-off-by: Pengjie Zhang <zhangpengjie2@huawei.com>
> ---
>   drivers/cpufreq/cpufreq.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 4472bb1ec83c..b3d2d2e0c864 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -2361,8 +2361,8 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
>   	target_freq = __resolve_freq(policy, target_freq, policy->min,
>   				     policy->max, relation);
>   
> -	pr_debug("target for CPU %u: %u kHz, relation %u, requested %u kHz\n",
> -		 policy->cpu, target_freq, relation, old_target_freq);
> +	pr_debug("CPU %u: cur %u kHz -> target %u kHz (req %u kHz, rel %u)\n",
> +		policy->cpu, policy->cur, target_freq, old_target_freq, relation);
>   
>   	/*
>   	 * This might look like a redundant call as we are checking it again

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cpufreq: Add debug print for current frequency in __cpufreq_driver_target()
  2026-01-30  6:27 ` Viresh Kumar
@ 2026-03-05 14:47   ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2026-03-05 14:47 UTC (permalink / raw)
  To: Viresh Kumar, Pengjie Zhang
  Cc: linux-pm, linux-kernel, zhanjie9, zhenglifeng1, lihuisong,
	yubowen8, linhongye, linuxarm, jonathan.cameron, wangzhi12

On Fri, Jan 30, 2026 at 7:27 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 29-01-26, 20:18, Pengjie Zhang wrote:
> > Include policy->cur in the debug message to explicitly show the frequency
> > transition (from current to target).
> >
> > Signed-off-by: Pengjie Zhang <zhangpengjie2@huawei.com>
> > ---
> >  drivers/cpufreq/cpufreq.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> > index 4472bb1ec83c..b3d2d2e0c864 100644
> > --- a/drivers/cpufreq/cpufreq.c
> > +++ b/drivers/cpufreq/cpufreq.c
> > @@ -2361,8 +2361,8 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
> >       target_freq = __resolve_freq(policy, target_freq, policy->min,
> >                                    policy->max, relation);
> >
> > -     pr_debug("target for CPU %u: %u kHz, relation %u, requested %u kHz\n",
> > -              policy->cpu, target_freq, relation, old_target_freq);
> > +     pr_debug("CPU %u: cur %u kHz -> target %u kHz (req %u kHz, rel %u)\n",
> > +             policy->cpu, policy->cur, target_freq, old_target_freq, relation);
> >
> >       /*
> >        * This might look like a redundant call as we are checking it again
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

Applied as 7.1 material, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-05 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-29 12:18 [PATCH] cpufreq: Add debug print for current frequency in __cpufreq_driver_target() Pengjie Zhang
2026-01-30  6:27 ` Viresh Kumar
2026-03-05 14:47   ` Rafael J. Wysocki
2026-03-03 11:48 ` zhangpengjie (A)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®