[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250401085148.xj5p6ir5lkjhgwqp@vireshk-i7>
Date: Tue, 1 Apr 2025 14:21:48 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Linux PM <linux-pm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Mario Limonciello <mario.limonciello@....com>,
Sudeep Holla <sudeep.holla@....com>
Subject: Re: [PATCH v1 10/10] cpufreq: Pass policy pointer to
->update_limits()
On 28-03-25, 21:48, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
> Since cpufreq_update_limits() obtains a cpufreq policy pointer for the
> given CPU and reference counts the corresponding policy object, it may
> as well pass the policy pointer to the cpufreq driver's ->update_limits()
> callback which allows that callback to avoid invoking cpufreq_cpu_get()
> for the same CPU.
>
> Accordingly, redefine ->update_limits() to take a policy pointer instead
> of a CPU number and update both drivers implementing it, intel_pstate
> and amd-pstate, as needed.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
> drivers/cpufreq/amd-pstate.c | 7 ++-----
> drivers/cpufreq/cpufreq.c | 2 +-
> drivers/cpufreq/intel_pstate.c | 29 ++++++++++++++++++-----------
> include/linux/cpufreq.h | 2 +-
> 4 files changed, 22 insertions(+), 18 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
--
viresh
Powered by blists - more mailing lists