aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeng Li <li.meng@amd.com>2022-09-08 08:28:21 +0800
committerShuah Khan <skhan@linuxfoundation.org>2022-10-05 11:05:18 -0600
commitbf6430f8512de304ec95c4558c2a47ad0787f90e (patch)
tree91ec96863b592b5403e809d619c3aef6793148b7
parent96788ac53dbab980e2308c4dc57bea4ba8e0bd2a (diff)
downloadstaging-bf6430f8512de304ec95c4558c2a47ad0787f90e.tar.gz
cpufreq: amd-pstate: Add explanation for X86_AMD_PSTATE_UT
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> Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
-rw-r--r--drivers/cpufreq/Kconfig.x868
-rwxr-xr-xtools/testing/selftests/amd-pstate/amd-pstate-ut.sh1
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
index fdd819069d723b..310779b07daf13 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 27336465028563..f8e82d91ffcf80 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