public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH 0/1] Add explanation for X86_AMD_PSTATE_UT
@ 2022-09-08  0:28 Meng Li
  2022-09-08  0:28 ` [RESEND PATCH] cpufreq: amd-pstate: " Meng Li
  0 siblings, 1 reply; 3+ messages in thread
From: Meng Li @ 2022-09-08  0:28 UTC (permalink / raw)
  To: Shuah Khan, Huang Rui, linux-pm
  Cc: Rafael J . Wysocki, Nathan Fontenot, Deepak Sharma, Alex Deucher,
	Mario Limonciello, Jinzhou Su, Perry Yuan, Xiaojian Du,
	Viresh Kumar, Borislav Petkov, linux-kernel, Meng Li

Hi all:

According to Shuah's review comments, add a new patches for expain
X86_AMD_PSTATE_UT.

amd-pstate-ut can also be built-in without X86_AMD_PSTATE enabled.
Currently, only tests for amd-pstate are supported. If X86_AMD_PSTATE
is set disabled, it can tell the users test can only run on amd-pstate
driver, please set X86_AMD_PSTATE enabled.
In the future, comparison tests will be added. It can set amd-pstate
disabled and set acpi-cpufreq enabled to run test cases, then compare
the test results.

Meng Li (1):
  cpufreq: amd-pstate: Add explanation for X86_AMD_PSTATE_UT

 drivers/cpufreq/Kconfig.x86                         | 8 ++++++++
 tools/testing/selftests/amd-pstate/amd-pstate-ut.sh | 1 +
 2 files changed, 9 insertions(+)

-- 
2.34.1


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

* [RESEND PATCH] cpufreq: amd-pstate: Add explanation for X86_AMD_PSTATE_UT
  2022-09-08  0:28 [RESEND PATCH 0/1] Add explanation for X86_AMD_PSTATE_UT Meng Li
@ 2022-09-08  0:28 ` Meng Li
  2022-09-08  1:18   ` Huang Rui
  0 siblings, 1 reply; 3+ messages in thread
From: Meng Li @ 2022-09-08  0:28 UTC (permalink / raw)
  To: Shuah Khan, Huang Rui, linux-pm
  Cc: Rafael J . Wysocki, Nathan Fontenot, Deepak Sharma, Alex Deucher,
	Mario Limonciello, Jinzhou Su, Perry Yuan, Xiaojian Du,
	Viresh Kumar, Borislav Petkov, linux-kernel, Meng Li

This kernel module is used for testing. It's safe to say M here.
It can also be built-in without X86_AMD_PSTATE enabled.
Currently, only tests for amd-pstate are supported. If X86_AMD_PSTATE
is set disabled, it can tell the users test can only run on amd-pstate
driver, please set X86_AMD_PSTATE enabled.
In the future, comparison tests will be added. It can set amd-pstate
disabled and set acpi-cpufreq enabled to run test cases, then compare
the test results.

Suggested-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Meng Li <li.meng@amd.com>
---
 drivers/cpufreq/Kconfig.x86                         | 8 ++++++++
 tools/testing/selftests/amd-pstate/amd-pstate-ut.sh | 1 +
 2 files changed, 9 insertions(+)

diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
index fdd819069d72..310779b07daf 100644
--- a/drivers/cpufreq/Kconfig.x86
+++ b/drivers/cpufreq/Kconfig.x86
@@ -58,6 +58,14 @@ config X86_AMD_PSTATE_UT
 	help
 	  This kernel module is used for testing. It's safe to say M here.
 
+	  It can also be built-in without X86_AMD_PSTATE enabled.
+	  Currently, only tests for amd-pstate are supported. If X86_AMD_PSTATE
+	  is set disabled, it can tell the users test can only run on amd-pstate
+	  driver, please set X86_AMD_PSTATE enabled.
+	  In the future, comparison tests will be added. It can set amd-pstate
+	  disabled and set acpi-cpufreq enabled to run test cases, then compare
+	  the test results.
+
 config X86_ACPI_CPUFREQ
 	tristate "ACPI Processor P-States driver"
 	depends on ACPI_PROCESSOR
diff --git a/tools/testing/selftests/amd-pstate/amd-pstate-ut.sh b/tools/testing/selftests/amd-pstate/amd-pstate-ut.sh
index 273364650285..f8e82d91ffcf 100755
--- a/tools/testing/selftests/amd-pstate/amd-pstate-ut.sh
+++ b/tools/testing/selftests/amd-pstate/amd-pstate-ut.sh
@@ -32,6 +32,7 @@ fi
 scaling_driver=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_driver)
 if [ "$scaling_driver" != "amd-pstate" ]; then
 	echo "$0 # Skipped: Test can only run on amd-pstate driver."
+	echo "$0 # Please set X86_AMD_PSTATE enabled."
 	echo "$0 # Current cpufreq scaling drvier is $scaling_driver."
 	exit $ksft_skip
 fi
-- 
2.34.1


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

* Re: [RESEND PATCH] cpufreq: amd-pstate: Add explanation for X86_AMD_PSTATE_UT
  2022-09-08  0:28 ` [RESEND PATCH] cpufreq: amd-pstate: " Meng Li
@ 2022-09-08  1:18   ` Huang Rui
  0 siblings, 0 replies; 3+ messages in thread
From: Huang Rui @ 2022-09-08  1:18 UTC (permalink / raw)
  To: Meng, Li (Jassmine)
  Cc: Shuah Khan, linux-pm@vger.kernel.org, Rafael J . Wysocki,
	Fontenot, Nathan, Sharma, Deepak, Deucher, Alexander,
	Limonciello, Mario, Su, Jinzhou (Joe), Yuan, Perry, Du, Xiaojian,
	Viresh Kumar, Borislav Petkov, linux-kernel@vger.kernel.org

On Thu, Sep 08, 2022 at 08:28:21AM +0800, Meng, Li (Jassmine) wrote:
> This kernel module is used for testing. It's safe to say M here.
> It can also be built-in without X86_AMD_PSTATE enabled.
> Currently, only tests for amd-pstate are supported. If X86_AMD_PSTATE
> is set disabled, it can tell the users test can only run on amd-pstate
> driver, please set X86_AMD_PSTATE enabled.
> In the future, comparison tests will be added. It can set amd-pstate
> disabled and set acpi-cpufreq enabled to run test cases, then compare
> the test results.
> 
> Suggested-by: Shuah Khan <skhan@linuxfoundation.org>
> Signed-off-by: Meng Li <li.meng@amd.com>

Patch looks very good for me. Please feel free to add

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

> ---
>  drivers/cpufreq/Kconfig.x86                         | 8 ++++++++
>  tools/testing/selftests/amd-pstate/amd-pstate-ut.sh | 1 +
>  2 files changed, 9 insertions(+)
> 
> diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
> index fdd819069d72..310779b07daf 100644
> --- a/drivers/cpufreq/Kconfig.x86
> +++ b/drivers/cpufreq/Kconfig.x86
> @@ -58,6 +58,14 @@ config X86_AMD_PSTATE_UT
>  	help
>  	  This kernel module is used for testing. It's safe to say M here.
>  
> +	  It can also be built-in without X86_AMD_PSTATE enabled.
> +	  Currently, only tests for amd-pstate are supported. If X86_AMD_PSTATE
> +	  is set disabled, it can tell the users test can only run on amd-pstate
> +	  driver, please set X86_AMD_PSTATE enabled.
> +	  In the future, comparison tests will be added. It can set amd-pstate
> +	  disabled and set acpi-cpufreq enabled to run test cases, then compare
> +	  the test results.
> +
>  config X86_ACPI_CPUFREQ
>  	tristate "ACPI Processor P-States driver"
>  	depends on ACPI_PROCESSOR
> diff --git a/tools/testing/selftests/amd-pstate/amd-pstate-ut.sh b/tools/testing/selftests/amd-pstate/amd-pstate-ut.sh
> index 273364650285..f8e82d91ffcf 100755
> --- a/tools/testing/selftests/amd-pstate/amd-pstate-ut.sh
> +++ b/tools/testing/selftests/amd-pstate/amd-pstate-ut.sh
> @@ -32,6 +32,7 @@ fi
>  scaling_driver=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_driver)
>  if [ "$scaling_driver" != "amd-pstate" ]; then
>  	echo "$0 # Skipped: Test can only run on amd-pstate driver."
> +	echo "$0 # Please set X86_AMD_PSTATE enabled."
>  	echo "$0 # Current cpufreq scaling drvier is $scaling_driver."
>  	exit $ksft_skip
>  fi
> -- 
> 2.34.1
> 

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

end of thread, other threads:[~2022-09-08  1:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-08  0:28 [RESEND PATCH 0/1] Add explanation for X86_AMD_PSTATE_UT Meng Li
2022-09-08  0:28 ` [RESEND PATCH] cpufreq: amd-pstate: " Meng Li
2022-09-08  1:18   ` Huang Rui

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