linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpufreq: amd-pstate: Let user know amd-pstate is disabled
@ 2023-02-23  1:30 Kai-Heng Feng
  2023-02-23  4:33 ` Huang Rui
  2023-02-23  5:02 ` Mario Limonciello
  0 siblings, 2 replies; 5+ messages in thread
From: Kai-Heng Feng @ 2023-02-23  1:30 UTC (permalink / raw)
  To: ray.huang
  Cc: mario.limonciello, Kai-Heng Feng, Rafael J. Wysocki,
	Viresh Kumar, linux-pm, linux-kernel

Commit 202e683df37c ("cpufreq: amd-pstate: add amd-pstate driver
parameter for mode selection") changed the driver to be disabled by
default, and this can suprise users.

Let users know what happened so they can decide what to do next.

BugLink: https://bugs.launchpad.net/bugs/2006942
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/cpufreq/amd-pstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 45c88894fd8e..305f73f657ed 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -1263,7 +1263,7 @@ static int __init amd_pstate_init(void)
 	 * with amd_pstate=passive or other modes in kernel command line
 	 */
 	if (cppc_state == AMD_PSTATE_DISABLE) {
-		pr_debug("driver load is disabled, boot with specific mode to enable this\n");
+		pr_info("amd_pstate is disabled, boot with specific mode to enable this\n");
 		return -ENODEV;
 	}
 
-- 
2.34.1


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

* Re: [PATCH] cpufreq: amd-pstate: Let user know amd-pstate is disabled
  2023-02-23  1:30 [PATCH] cpufreq: amd-pstate: Let user know amd-pstate is disabled Kai-Heng Feng
@ 2023-02-23  4:33 ` Huang Rui
  2023-02-23  5:02 ` Mario Limonciello
  1 sibling, 0 replies; 5+ messages in thread
From: Huang Rui @ 2023-02-23  4:33 UTC (permalink / raw)
  To: Kai-Heng Feng
  Cc: Limonciello, Mario, Rafael J. Wysocki, Viresh Kumar, linux-pm,
	linux-kernel

On Thu, Feb 23, 2023 at 09:30:32AM +0800, Kai-Heng Feng wrote:
> Commit 202e683df37c ("cpufreq: amd-pstate: add amd-pstate driver
> parameter for mode selection") changed the driver to be disabled by
> default, and this can suprise users.
> 
> Let users know what happened so they can decide what to do next.
> 
> BugLink: https://bugs.launchpad.net/bugs/2006942
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

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

> ---
>  drivers/cpufreq/amd-pstate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 45c88894fd8e..305f73f657ed 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -1263,7 +1263,7 @@ static int __init amd_pstate_init(void)
>  	 * with amd_pstate=passive or other modes in kernel command line
>  	 */
>  	if (cppc_state == AMD_PSTATE_DISABLE) {
> -		pr_debug("driver load is disabled, boot with specific mode to enable this\n");
> +		pr_info("amd_pstate is disabled, boot with specific mode to enable this\n");
>  		return -ENODEV;
>  	}
>  
> -- 
> 2.34.1
> 

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

* Re: [PATCH] cpufreq: amd-pstate: Let user know amd-pstate is disabled
  2023-02-23  1:30 [PATCH] cpufreq: amd-pstate: Let user know amd-pstate is disabled Kai-Heng Feng
  2023-02-23  4:33 ` Huang Rui
@ 2023-02-23  5:02 ` Mario Limonciello
  2023-02-23  6:49   ` Kai-Heng Feng
  1 sibling, 1 reply; 5+ messages in thread
From: Mario Limonciello @ 2023-02-23  5:02 UTC (permalink / raw)
  To: Kai-Heng Feng, ray.huang
  Cc: Rafael J. Wysocki, Viresh Kumar, linux-pm, linux-kernel

On 2/22/23 19:30, Kai-Heng Feng wrote:
> Commit 202e683df37c ("cpufreq: amd-pstate: add amd-pstate driver

s/Commit/commit/

> parameter for mode selection") changed the driver to be disabled by
> default, and this can suprise users.

s/suprise/surprise/

> 
> Let users know what happened so they can decide what to do next.
> 
> BugLink: https://bugs.launchpad.net/bugs/2006942

s/BugLink/Link/

BugLink isn't an official tag, you should use "Link".

> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>   drivers/cpufreq/amd-pstate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 45c88894fd8e..305f73f657ed 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -1263,7 +1263,7 @@ static int __init amd_pstate_init(void)
>   	 * with amd_pstate=passive or other modes in kernel command line
>   	 */
>   	if (cppc_state == AMD_PSTATE_DISABLE) {
> -		pr_debug("driver load is disabled, boot with specific mode to enable this\n");
> +		pr_info("amd_pstate is disabled, boot with specific mode to enable this\n");

The file uses `pr_fmt` so this will show up as `amd_pstate: amd_state is 
disabled`.  That's a bit redundant no?

>   		return -ENODEV;
>   	}
>   


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

* Re: [PATCH] cpufreq: amd-pstate: Let user know amd-pstate is disabled
  2023-02-23  5:02 ` Mario Limonciello
@ 2023-02-23  6:49   ` Kai-Heng Feng
  2023-02-23 19:26     ` Limonciello, Mario
  0 siblings, 1 reply; 5+ messages in thread
From: Kai-Heng Feng @ 2023-02-23  6:49 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: ray.huang, Rafael J. Wysocki, Viresh Kumar, linux-pm, linux-kernel

On Thu, Feb 23, 2023 at 1:02 PM Mario Limonciello
<mario.limonciello@amd.com> wrote:
>
> On 2/22/23 19:30, Kai-Heng Feng wrote:
> > Commit 202e683df37c ("cpufreq: amd-pstate: add amd-pstate driver
>
> s/Commit/commit/

I think the first character of the sentence still needs to be capitalized?

>
> > parameter for mode selection") changed the driver to be disabled by
> > default, and this can suprise users.
>
> s/suprise/surprise/

Will change.

>
> >
> > Let users know what happened so they can decide what to do next.
> >
> > BugLink: https://bugs.launchpad.net/bugs/2006942
>
> s/BugLink/Link/
>
> BugLink isn't an official tag, you should use "Link".

Will change.

>
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > ---
> >   drivers/cpufreq/amd-pstate.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> > index 45c88894fd8e..305f73f657ed 100644
> > --- a/drivers/cpufreq/amd-pstate.c
> > +++ b/drivers/cpufreq/amd-pstate.c
> > @@ -1263,7 +1263,7 @@ static int __init amd_pstate_init(void)
> >        * with amd_pstate=passive or other modes in kernel command line
> >        */
> >       if (cppc_state == AMD_PSTATE_DISABLE) {
> > -             pr_debug("driver load is disabled, boot with specific mode to enable this\n");
> > +             pr_info("amd_pstate is disabled, boot with specific mode to enable this\n");
>
> The file uses `pr_fmt` so this will show up as `amd_pstate: amd_state is
> disabled`.  That's a bit redundant no?

Will change.

Kai-Heng

>
> >               return -ENODEV;
> >       }
> >
>

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

* RE: [PATCH] cpufreq: amd-pstate: Let user know amd-pstate is disabled
  2023-02-23  6:49   ` Kai-Heng Feng
@ 2023-02-23 19:26     ` Limonciello, Mario
  0 siblings, 0 replies; 5+ messages in thread
From: Limonciello, Mario @ 2023-02-23 19:26 UTC (permalink / raw)
  To: Kai-Heng Feng
  Cc: Huang, Ray, Rafael J. Wysocki, Viresh Kumar, linux-pm, linux-kernel

[Public]



> -----Original Message-----
> From: Kai-Heng Feng <kai.heng.feng@canonical.com>
> Sent: Thursday, February 23, 2023 00:49
> To: Limonciello, Mario <Mario.Limonciello@amd.com>
> Cc: Huang, Ray <Ray.Huang@amd.com>; Rafael J. Wysocki
> <rafael@kernel.org>; Viresh Kumar <viresh.kumar@linaro.org>; linux-
> pm@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] cpufreq: amd-pstate: Let user know amd-pstate is
> disabled
> 
> On Thu, Feb 23, 2023 at 1:02 PM Mario Limonciello
> <mario.limonciello@amd.com> wrote:
> >
> > On 2/22/23 19:30, Kai-Heng Feng wrote:
> > > Commit 202e683df37c ("cpufreq: amd-pstate: add amd-pstate driver
> >
> > s/Commit/commit/
> 
> I think the first character of the sentence still needs to be capitalized?

I had thought checkpatch was pedantic about 
commit foo ("reason")

Not a big deal though.

> 
> >
> > > parameter for mode selection") changed the driver to be disabled by
> > > default, and this can suprise users.
> >
> > s/suprise/surprise/
> 
> Will change.
> 
> >
> > >
> > > Let users know what happened so they can decide what to do next.
> > >
> > > BugLink: https://bugs.launchpad.net/bugs/2006942
> >
> > s/BugLink/Link/
> >
> > BugLink isn't an official tag, you should use "Link".
> 
> Will change.
> 
> >
> > > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > > ---
> > >   drivers/cpufreq/amd-pstate.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> > > index 45c88894fd8e..305f73f657ed 100644
> > > --- a/drivers/cpufreq/amd-pstate.c
> > > +++ b/drivers/cpufreq/amd-pstate.c
> > > @@ -1263,7 +1263,7 @@ static int __init amd_pstate_init(void)
> > >        * with amd_pstate=passive or other modes in kernel command line
> > >        */
> > >       if (cppc_state == AMD_PSTATE_DISABLE) {
> > > -             pr_debug("driver load is disabled, boot with specific mode to
> enable this\n");
> > > +             pr_info("amd_pstate is disabled, boot with specific mode to
> enable this\n");
> >
> > The file uses `pr_fmt` so this will show up as `amd_pstate: amd_state is
> > disabled`.  That's a bit redundant no?
> 
> Will change.
> 
> Kai-Heng
> 
> >
> > >               return -ENODEV;
> > >       }
> > >
> >

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

end of thread, other threads:[~2023-02-23 19:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23  1:30 [PATCH] cpufreq: amd-pstate: Let user know amd-pstate is disabled Kai-Heng Feng
2023-02-23  4:33 ` Huang Rui
2023-02-23  5:02 ` Mario Limonciello
2023-02-23  6:49   ` Kai-Heng Feng
2023-02-23 19:26     ` Limonciello, Mario

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).