linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Ionela Voinescu <ionela.voinescu@arm.com>
Cc: rjw@rjwysocki.net, lenb@kernel.org, sudeep.holla@arm.com,
	morten.rasmussen@arm.com, jeremy.linton@arm.com,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/8] cppc_cpufreq: use policy->cpu as driver of frequency setting
Date: Mon, 9 Nov 2020 12:35:31 +0530	[thread overview]
Message-ID: <20201109070531.jqoury5vniu3phdo@vireshk-i7> (raw)
In-Reply-To: <20201105125524.4409-6-ionela.voinescu@arm.com>

On 05-11-20, 12:55, Ionela Voinescu wrote:
> Considering only the currently supported coordination types (ANY, HW,
> NONE), this change only makes a difference for the ANY type, when
> policy->cpu is hotplugged out. In that case the new policy->cpu will
> be different from ((struct cppc_cpudata *)policy->driver_data)->cpu.
> 
> While in this case the controls of *ANY* CPU could be used to drive
> frequency changes, it's more consistent to use policy->cpu as the
> leading CPU, as used in all other cppc_cpufreq functions. Additionally,
> the debug prints in cppc_set_perf() would no longer create confusion
> when referring to a CPU that is hotplugged out.
> 
> Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/cppc_cpufreq.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
> index ac95b4424a2e..fd2daeb59b49 100644
> --- a/drivers/cpufreq/cppc_cpufreq.c
> +++ b/drivers/cpufreq/cppc_cpufreq.c
> @@ -150,6 +150,7 @@ static int cppc_cpufreq_set_target(struct cpufreq_policy *policy,
>  
>  {
>  	struct cppc_cpudata *cpu_data = policy->driver_data;
> +	unsigned int cpu = policy->cpu;
>  	struct cpufreq_freqs freqs;
>  	u32 desired_perf;
>  	int ret = 0;
> @@ -164,12 +165,12 @@ static int cppc_cpufreq_set_target(struct cpufreq_policy *policy,
>  	freqs.new = target_freq;
>  
>  	cpufreq_freq_transition_begin(policy, &freqs);
> -	ret = cppc_set_perf(cpu_data->cpu, &cpu_data->perf_ctrls);
> +	ret = cppc_set_perf(cpu, &cpu_data->perf_ctrls);
>  	cpufreq_freq_transition_end(policy, &freqs, ret != 0);
>  
>  	if (ret)
>  		pr_debug("Failed to set target on CPU:%d. ret:%d\n",
> -			 cpu_data->cpu, ret);
> +			 cpu, ret);
>  
>  	return ret;
>  }

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

-- 
viresh

  reply	other threads:[~2020-11-09  7:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 12:55 [PATCH 0/8] cppc_cpufreq: fix, clarify and improve support Ionela Voinescu
2020-11-05 12:55 ` [PATCH 1/8] cppc_cpufreq: fix misspelling, code style and readability issues Ionela Voinescu
2020-11-09  6:58   ` Viresh Kumar
2020-11-05 12:55 ` [PATCH 2/8] cppc_cpufreq: clean up cpu, cpu_num and cpunum variable use Ionela Voinescu
2020-11-09  6:59   ` Viresh Kumar
2020-11-05 12:55 ` [PATCH 3/8] cppc_cpufreq: simplify use of performance capabilities Ionela Voinescu
2020-11-09  7:01   ` Viresh Kumar
2020-11-05 12:55 ` [PATCH 4/8] cppc_cpufreq: replace per-cpu structures with lists Ionela Voinescu
2020-11-05 15:50   ` Jeremy Linton
2020-11-05 17:00     ` Ionela Voinescu
2020-11-05 12:55 ` [PATCH 5/8] cppc_cpufreq: use policy->cpu as driver of frequency setting Ionela Voinescu
2020-11-09  7:05   ` Viresh Kumar [this message]
2020-11-05 12:55 ` [PATCH 6/8] cppc_cpufreq: clarify support for coordination types Ionela Voinescu
2020-11-09  7:07   ` Viresh Kumar
2020-11-05 12:55 ` [PATCH 7/8] cppc_cpufreq: expose information on frequency domains Ionela Voinescu
2020-11-09  7:09   ` Viresh Kumar
2020-11-05 12:55 ` [PATCH 8/8] acpi: fix NONE coordination for domain mapping failure Ionela Voinescu
2020-11-05 13:05   ` Rafael J. Wysocki
2020-11-05 14:02     ` Ionela Voinescu
2020-11-05 14:47       ` Rafael J. Wysocki
2020-11-09  7:10   ` Viresh Kumar
2020-11-17 14:59 ` [PATCH 0/8] cppc_cpufreq: fix, clarify and improve support Rafael J. Wysocki
2020-11-17 15:32   ` Ionela Voinescu
2020-11-17 16:30     ` Rafael J. Wysocki
2020-11-17 19:04       ` Ionela Voinescu
2020-11-17 18:49 ` [PATCH] cppc_cpufreq: optimise memory allocation for HW and NONE coordination Ionela Voinescu
2020-11-23 17:32   ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201109070531.jqoury5vniu3phdo@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=ionela.voinescu@arm.com \
    --cc=jeremy.linton@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).