linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: "Limonciello, Mario" <Mario.Limonciello@amd.com>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	"open list:AMD PSTATE DRIVER" <linux-pm@vger.kernel.org>,
	"Yuan, Perry" <Perry.Yuan@amd.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 3/6] cpufreq: amd-pstate: Move cpufreq driver check later
Date: Wed, 27 Apr 2022 22:45:14 +0800	[thread overview]
Message-ID: <YmlW+pW41WBf0vu8@amd.com> (raw)
In-Reply-To: <20220414164801.1051-4-mario.limonciello@amd.com>

On Fri, Apr 15, 2022 at 12:47:58AM +0800, Limonciello, Mario wrote:
> The cpufreq driver check occurs before we verify if the CPU is supported.
> 
> Depending upon module load order, this may mean that users are never
> notified they can enable the shared memory solution.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

Acked-by: Huang Rui <ray.huang@amd.com>

> ---
> v2->v3:
>  * New patch
> 
>  drivers/cpufreq/amd-pstate.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index ecd1fd5e5b5a..d323f3e3888c 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -653,10 +653,6 @@ static int __init amd_pstate_init(void)
>  		return -ENODEV;
>  	}
>  
> -	/* don't keep reloading if cpufreq_driver exists */
> -	if (cpufreq_get_current_driver())
> -		return -EEXIST;
> -
>  	/* capability check */
>  	if (boot_cpu_has(X86_FEATURE_CPPC)) {
>  		pr_debug("AMD CPPC MSR based functionality is supported\n");
> @@ -670,6 +666,10 @@ static int __init amd_pstate_init(void)
>  		return -ENODEV;
>  	}
>  
> +	/* don't keep reloading if cpufreq_driver exists */
> +	if (cpufreq_get_current_driver())
> +		return -EEXIST;
> +
>  	/* enable amd pstate feature */
>  	ret = amd_pstate_enable(true);
>  	if (ret) {
> -- 
> 2.34.1
> 

  reply	other threads:[~2022-04-27 14:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14 16:47 [PATCH v3 0/6] Improve usability for amd-pstate Mario Limonciello
2022-04-14 16:47 ` [PATCH v3 1/6] cpufreq: Export acpu_cpufreq_exit for other drivers to call Mario Limonciello
2022-04-14 16:47 ` [PATCH v3 2/6] cpufreq: amd-pstate: Only show shared memory solution message once Mario Limonciello
2022-04-27 13:46   ` Huang Rui
2022-04-14 16:47 ` [PATCH v3 3/6] cpufreq: amd-pstate: Move cpufreq driver check later Mario Limonciello
2022-04-27 14:45   ` Huang Rui [this message]
2022-04-14 16:47 ` [PATCH v3 4/6] cpufreq: amd-pstate: Allow replacing acpi-cpufreq when loaded Mario Limonciello
2022-04-14 17:32   ` Nathan Fontenot
2022-04-14 17:58     ` Limonciello, Mario
2022-04-21 18:38       ` Rafael J. Wysocki
2022-04-28  7:15         ` Huang Rui
2022-04-29  2:36           ` Nathan Fontenot
2022-04-29  6:26             ` Huang Rui
2022-04-14 16:48 ` [PATCH v3 5/6] cpufreq: amd-pstate: Add a module device table Mario Limonciello
2022-04-14 16:48 ` [PATCH v3 6/6] cpufreq: amd-pstate: Default to replace acpi-cpufreq Mario Limonciello

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=YmlW+pW41WBf0vu8@amd.com \
    --to=ray.huang@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=Perry.Yuan@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=viresh.kumar@linaro.org \
    /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).