public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpupower: Fix querying boost support for amd-pstate-epp mode
@ 2023-08-11 21:35 Mario Limonciello
  2023-08-14  4:14 ` Huang Rui
  0 siblings, 1 reply; 8+ messages in thread
From: Mario Limonciello @ 2023-08-11 21:35 UTC (permalink / raw)
  To: Perry.Yuan, ray.huang, wyes.karny, trenn, shuah
  Cc: rafael.j.wysocki, linux-pm, linux-kernel, Mario Limonciello,
	chenhq2005

When running in active mode the driver for amd-pstate has -epp appended.
This throws off amd-pstate detection.

To detect amd-pstate look for the prefix instead.

Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors")
Reported-by: chenhq2005@gmail.com
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217755
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 tools/power/cpupower/utils/helpers/misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/power/cpupower/utils/helpers/misc.c b/tools/power/cpupower/utils/helpers/misc.c
index 9547b29254a7f..01c0440efe850 100644
--- a/tools/power/cpupower/utils/helpers/misc.c
+++ b/tools/power/cpupower/utils/helpers/misc.c
@@ -95,7 +95,7 @@ bool cpupower_amd_pstate_enabled(void)
 	if (!driver)
 		return ret;
 
-	if (!strcmp(driver, "amd-pstate"))
+	if (!strncmp(driver, "amd-pstate", 10))
 		ret = true;
 
 	cpufreq_put_driver(driver);
-- 
2.34.1


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

* Re: [PATCH] cpupower: Fix querying boost support for amd-pstate-epp mode
  2023-08-11 21:35 [PATCH] cpupower: Fix querying boost support for amd-pstate-epp mode Mario Limonciello
@ 2023-08-14  4:14 ` Huang Rui
  2023-08-14 21:28   ` Shuah Khan
  0 siblings, 1 reply; 8+ messages in thread
From: Huang Rui @ 2023-08-14  4:14 UTC (permalink / raw)
  To: Limonciello, Mario
  Cc: Yuan, Perry, Karny, Wyes, trenn@suse.com, shuah@kernel.org,
	rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, chenhq2005@gmail.com

On Sat, Aug 12, 2023 at 05:35:01AM +0800, Limonciello, Mario wrote:
> When running in active mode the driver for amd-pstate has -epp appended.
> This throws off amd-pstate detection.
> 
> To detect amd-pstate look for the prefix instead.
> 
> Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors")
> Reported-by: chenhq2005@gmail.com
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217755
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

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

> ---
>  tools/power/cpupower/utils/helpers/misc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/power/cpupower/utils/helpers/misc.c b/tools/power/cpupower/utils/helpers/misc.c
> index 9547b29254a7f..01c0440efe850 100644
> --- a/tools/power/cpupower/utils/helpers/misc.c
> +++ b/tools/power/cpupower/utils/helpers/misc.c
> @@ -95,7 +95,7 @@ bool cpupower_amd_pstate_enabled(void)
>  	if (!driver)
>  		return ret;
>  
> -	if (!strcmp(driver, "amd-pstate"))
> +	if (!strncmp(driver, "amd-pstate", 10))
>  		ret = true;
>  
>  	cpufreq_put_driver(driver);
> -- 
> 2.34.1
> 

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

* Re: [PATCH] cpupower: Fix querying boost support for amd-pstate-epp mode
  2023-08-14  4:14 ` Huang Rui
@ 2023-08-14 21:28   ` Shuah Khan
  2023-08-14 21:50     ` Limonciello, Mario
  0 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2023-08-14 21:28 UTC (permalink / raw)
  To: Huang Rui, Limonciello, Mario
  Cc: Yuan, Perry, Karny, Wyes, trenn@suse.com, shuah@kernel.org,
	rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, chenhq2005@gmail.com, Shuah Khan

On 8/13/23 22:14, Huang Rui wrote:
> On Sat, Aug 12, 2023 at 05:35:01AM +0800, Limonciello, Mario wrote:
>> When running in active mode the driver for amd-pstate has -epp appended.
>> This throws off amd-pstate detection.
>>
>> To detect amd-pstate look for the prefix instead.
>>
>> Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors")
>> Reported-by: chenhq2005@gmail.com
>> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217755
>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> 
> Acked-by: Huang Rui <ray.huang@amd.com>
> 

This patch doesn't apply on top of cpupower latest:

https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git coupower

Please rebase and send it.

thanks,
-- Shuah


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

* Re: [PATCH] cpupower: Fix querying boost support for amd-pstate-epp mode
  2023-08-14 21:28   ` Shuah Khan
@ 2023-08-14 21:50     ` Limonciello, Mario
  2023-08-14 23:22       ` Shuah Khan
  0 siblings, 1 reply; 8+ messages in thread
From: Limonciello, Mario @ 2023-08-14 21:50 UTC (permalink / raw)
  To: Shuah Khan, Huang Rui
  Cc: Yuan, Perry, Karny, Wyes, trenn@suse.com, shuah@kernel.org,
	rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, chenhq2005@gmail.com



On 8/14/2023 4:28 PM, Shuah Khan wrote:
> On 8/13/23 22:14, Huang Rui wrote:
>> On Sat, Aug 12, 2023 at 05:35:01AM +0800, Limonciello, Mario wrote:
>>> When running in active mode the driver for amd-pstate has -epp appended.
>>> This throws off amd-pstate detection.
>>>
>>> To detect amd-pstate look for the prefix instead.
>>>
>>> Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP 
>>> support for the AMD processors")
>>> Reported-by: chenhq2005@gmail.com
>>> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217755
>>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>>
>> Acked-by: Huang Rui <ray.huang@amd.com>
>>
> 
> This patch doesn't apply on top of cpupower latest:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git coupower
> 
> Please rebase and send it.
> 
> thanks,
> -- Shuah
> 

It looks like a variation of it is already in your tree as:

a1cf97c2d43ae ("cpupower: Recognise amd-pstate active mode driver")

Considering it was also reported to a kernel bugzilla, perhaps this 
should be considered for fixes?

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

* Re: [PATCH] cpupower: Fix querying boost support for amd-pstate-epp mode
  2023-08-14 21:50     ` Limonciello, Mario
@ 2023-08-14 23:22       ` Shuah Khan
  2023-08-14 23:33         ` Limonciello, Mario
  0 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2023-08-14 23:22 UTC (permalink / raw)
  To: Limonciello, Mario, Huang Rui
  Cc: Yuan, Perry, Karny, Wyes, trenn@suse.com, shuah@kernel.org,
	rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, chenhq2005@gmail.com, Shuah Khan

On 8/14/23 15:50, Limonciello, Mario wrote:
> 
> 
> On 8/14/2023 4:28 PM, Shuah Khan wrote:
>> On 8/13/23 22:14, Huang Rui wrote:
>>> On Sat, Aug 12, 2023 at 05:35:01AM +0800, Limonciello, Mario wrote:
>>>> When running in active mode the driver for amd-pstate has -epp appended.
>>>> This throws off amd-pstate detection.
>>>>
>>>> To detect amd-pstate look for the prefix instead.
>>>>
>>>> Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors")
>>>> Reported-by: chenhq2005@gmail.com
>>>> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217755
>>>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>>>
>>> Acked-by: Huang Rui <ray.huang@amd.com>
>>>
>>
>> This patch doesn't apply on top of cpupower latest:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git coupower
>>
>> Please rebase and send it.
>>
>> thanks,
>> -- Shuah
>>
> 
> It looks like a variation of it is already in your tree as:
> 
> a1cf97c2d43ae ("cpupower: Recognise amd-pstate active mode driver")
> 
> Considering it was also reported to a kernel bugzilla, perhaps this should be considered for fixes?

If it is already fixed, there is no need to revert and apply your fix.
Please close the bugzilla bug as fixed with the above commit.

thanks,
-- Shuah


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

* Re: [PATCH] cpupower: Fix querying boost support for amd-pstate-epp mode
  2023-08-14 23:22       ` Shuah Khan
@ 2023-08-14 23:33         ` Limonciello, Mario
  2023-08-15  0:03           ` Shuah Khan
  0 siblings, 1 reply; 8+ messages in thread
From: Limonciello, Mario @ 2023-08-14 23:33 UTC (permalink / raw)
  To: Shuah Khan, Huang Rui
  Cc: Yuan, Perry, Karny, Wyes, trenn@suse.com, shuah@kernel.org,
	rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, chenhq2005@gmail.com



On 8/14/2023 6:22 PM, Shuah Khan wrote:
> On 8/14/23 15:50, Limonciello, Mario wrote:
>>
>>
>> On 8/14/2023 4:28 PM, Shuah Khan wrote:
>>> On 8/13/23 22:14, Huang Rui wrote:
>>>> On Sat, Aug 12, 2023 at 05:35:01AM +0800, Limonciello, Mario wrote:
>>>>> When running in active mode the driver for amd-pstate has -epp 
>>>>> appended.
>>>>> This throws off amd-pstate detection.
>>>>>
>>>>> To detect amd-pstate look for the prefix instead.
>>>>>
>>>>> Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP 
>>>>> support for the AMD processors")
>>>>> Reported-by: chenhq2005@gmail.com
>>>>> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217755
>>>>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>>>>
>>>> Acked-by: Huang Rui <ray.huang@amd.com>
>>>>
>>>
>>> This patch doesn't apply on top of cpupower latest:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git coupower
>>>
>>> Please rebase and send it.
>>>
>>> thanks,
>>> -- Shuah
>>>
>>
>> It looks like a variation of it is already in your tree as:
>>
>> a1cf97c2d43ae ("cpupower: Recognise amd-pstate active mode driver")
>>
>> Considering it was also reported to a kernel bugzilla, perhaps this 
>> should be considered for fixes?
> 
> If it is already fixed, there is no need to revert and apply your fix.
> Please close the bugzilla bug as fixed with the above commit.

Sorry I was unclear. My suggestion was that perhaps a1cf97c2d43ae 
should be considered alone for 6.5-rc7 instead of waiting for 6.6-rc1 as 
it fixes the Bugzilla issue.  Otherwise we should wait until it's in 
Linus' tree for 6.6-rc1 to close the Bugzilla.

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

* Re: [PATCH] cpupower: Fix querying boost support for amd-pstate-epp mode
  2023-08-14 23:33         ` Limonciello, Mario
@ 2023-08-15  0:03           ` Shuah Khan
  2023-08-15  1:46             ` Limonciello, Mario
  0 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2023-08-15  0:03 UTC (permalink / raw)
  To: Limonciello, Mario, Huang Rui
  Cc: Yuan, Perry, Karny, Wyes, trenn@suse.com, shuah@kernel.org,
	rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, chenhq2005@gmail.com, Shuah Khan

On 8/14/23 17:33, Limonciello, Mario wrote:
> 
> 
> On 8/14/2023 6:22 PM, Shuah Khan wrote:
>> On 8/14/23 15:50, Limonciello, Mario wrote:
>>>
>>>
>>> On 8/14/2023 4:28 PM, Shuah Khan wrote:
>>>> On 8/13/23 22:14, Huang Rui wrote:
>>>>> On Sat, Aug 12, 2023 at 05:35:01AM +0800, Limonciello, Mario wrote:
>>>>>> When running in active mode the driver for amd-pstate has -epp appended.
>>>>>> This throws off amd-pstate detection.
>>>>>>
>>>>>> To detect amd-pstate look for the prefix instead.
>>>>>>
>>>>>> Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors")
>>>>>> Reported-by: chenhq2005@gmail.com
>>>>>> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217755
>>>>>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>>>>>
>>>>> Acked-by: Huang Rui <ray.huang@amd.com>
>>>>>
>>>>
>>>> This patch doesn't apply on top of cpupower latest:
>>>>
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git coupower
>>>>
>>>> Please rebase and send it.
>>>>
>>>> thanks,
>>>> -- Shuah
>>>>
>>>
>>> It looks like a variation of it is already in your tree as:
>>>
>>> a1cf97c2d43ae ("cpupower: Recognise amd-pstate active mode driver")
>>>
>>> Considering it was also reported to a kernel bugzilla, perhaps this should be considered for fixes?
>>
>> If it is already fixed, there is no need to revert and apply your fix.
>> Please close the bugzilla bug as fixed with the above commit.
> 
> Sorry I was unclear. My suggestion was that perhaps a1cf97c2d43ae should be considered alone for 6.5-rc7 instead of waiting for 6.6-rc1 as it fixes the Bugzilla issue.  Otherwise we should wait until it's in Linus' tree for 6.6-rc1 to close the Bugzilla.

Got it. There isn't enough time now to get this to flow through
my workflow and then into pm workflow. Since the bug is fixed
in linux-next, it will go inot Linux 6.6-rc1. Then it can go into
stables.

thanks,
-- Shuah


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

* Re: [PATCH] cpupower: Fix querying boost support for amd-pstate-epp mode
  2023-08-15  0:03           ` Shuah Khan
@ 2023-08-15  1:46             ` Limonciello, Mario
  0 siblings, 0 replies; 8+ messages in thread
From: Limonciello, Mario @ 2023-08-15  1:46 UTC (permalink / raw)
  To: Shuah Khan, Huang Rui
  Cc: Yuan, Perry, Karny, Wyes, trenn@suse.com, shuah@kernel.org,
	rafael.j.wysocki@intel.com, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, chenhq2005@gmail.com



On 8/14/2023 7:03 PM, Shuah Khan wrote:
> On 8/14/23 17:33, Limonciello, Mario wrote:
>>
>>
>> On 8/14/2023 6:22 PM, Shuah Khan wrote:
>>> On 8/14/23 15:50, Limonciello, Mario wrote:
>>>>
>>>>
>>>> On 8/14/2023 4:28 PM, Shuah Khan wrote:
>>>>> On 8/13/23 22:14, Huang Rui wrote:
>>>>>> On Sat, Aug 12, 2023 at 05:35:01AM +0800, Limonciello, Mario wrote:
>>>>>>> When running in active mode the driver for amd-pstate has -epp 
>>>>>>> appended.
>>>>>>> This throws off amd-pstate detection.
>>>>>>>
>>>>>>> To detect amd-pstate look for the prefix instead.
>>>>>>>
>>>>>>> Fixes: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP 
>>>>>>> support for the AMD processors")
>>>>>>> Reported-by: chenhq2005@gmail.com
>>>>>>> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217755
>>>>>>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>>>>>>
>>>>>> Acked-by: Huang Rui <ray.huang@amd.com>
>>>>>>
>>>>>
>>>>> This patch doesn't apply on top of cpupower latest:
>>>>>
>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git 
>>>>> coupower
>>>>>
>>>>> Please rebase and send it.
>>>>>
>>>>> thanks,
>>>>> -- Shuah
>>>>>
>>>>
>>>> It looks like a variation of it is already in your tree as:
>>>>
>>>> a1cf97c2d43ae ("cpupower: Recognise amd-pstate active mode driver")
>>>>
>>>> Considering it was also reported to a kernel bugzilla, perhaps this 
>>>> should be considered for fixes?
>>>
>>> If it is already fixed, there is no need to revert and apply your fix.
>>> Please close the bugzilla bug as fixed with the above commit.
>>
>> Sorry I was unclear. My suggestion was that perhaps a1cf97c2d43ae 
>> should be considered alone for 6.5-rc7 instead of waiting for 6.6-rc1 
>> as it fixes the Bugzilla issue.  Otherwise we should wait until it's 
>> in Linus' tree for 6.6-rc1 to close the Bugzilla.
> 
> Got it. There isn't enough time now to get this to flow through
> my workflow and then into pm workflow. Since the bug is fixed
> in linux-next, it will go inot Linux 6.6-rc1. Then it can go into
> stables.
> 

Got it.  In that case can you add the Fixes and CC: 
stable@vger.kernel.org tags to the correct commit in your branch so that 
all that happens automatically during 6.6's merge window?



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

end of thread, other threads:[~2023-08-15  1:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 21:35 [PATCH] cpupower: Fix querying boost support for amd-pstate-epp mode Mario Limonciello
2023-08-14  4:14 ` Huang Rui
2023-08-14 21:28   ` Shuah Khan
2023-08-14 21:50     ` Limonciello, Mario
2023-08-14 23:22       ` Shuah Khan
2023-08-14 23:33         ` Limonciello, Mario
2023-08-15  0:03           ` Shuah Khan
2023-08-15  1:46             ` Limonciello, Mario

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