Skip to content

Commit

Permalink
cpufreq: amd-pstate: Add explanation for X86_AMD_PSTATE_UT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Meng Li authored and Shuah Khan committed Oct 5, 2022
1 parent 96788ac commit bf6430f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/cpufreq/Kconfig.x86
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tools/testing/selftests/amd-pstate/amd-pstate-ut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bf6430f

Please sign in to comment.