From: Meng Li <li.meng@amd.com>
To: Shuah Khan <skhan@linuxfoundation.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Huang Rui <ray.huang@amd.com>, <linux-pm@vger.kernel.org>
Cc: Nathan Fontenot <nathan.fontenot@amd.com>,
Deepak Sharma <deepak.sharma@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
"Mario Limonciello" <mario.limonciello@amd.com>,
Jinzhou Su <Jinzhou.Su@amd.com>, Perry Yuan <Perry.Yuan@amd.com>,
Xiaojian Du <Xiaojian.Du@amd.com>,
"Viresh Kumar" <viresh.kumar@linaro.org>,
Borislav Petkov <bp@alien8.de>, <linux-kernel@vger.kernel.org>,
Meng Li <li.meng@amd.com>
Subject: [PATCH 0/3] Add unit test module for AMD P-State driver
Date: Wed, 23 Mar 2022 15:14:59 +0800 [thread overview]
Message-ID: <20220323071502.2674156-1-li.meng@amd.com> (raw)
Hi all:
AMD P-State unit test(amd-pstate-ut) is a kernel module for testing the
functions of amd-pstate.
It could import as a module to launch some test tasks.
We upstream out AMD P-state driver into Linux kernel and use this unit
test module to verify the required conditions and basic functions of
amd-pstate before integration test.
When you test all the test cases, you will get the following test results.
The status "P" is pass, "F" is fail.
jasmine@jasmine:/sys/module/amd_pstate_ut/parameters$ cat
unit_test
Index Test cases Status
0 stop [ ]
1 all [P]
2 x86_vendor [P]
3 acpi_cpc_valid [P]
4 modprobed_driver [P]
5 capability_check [P]
6 enable [P]
7 init_perf [P]
8 support_boost [P]
9 clear_status [ ]
------------------------------------------
begin_index = 1 end_index= 8
For exmaple: The test case acpi_cpc_valid is used to check whether the
_CPC object is exist in SBIOS.
The amd-pstate initialization will fail if the _CPC in ACPI SBIOS is
not existed at the detected processor, so it is a necessary condition.
At present, its test cases are very simple, and the corresponding test
cases will continue to be added later to improve the test coverage.
Thanks,
Jasmine
Meng Li (3):
cpufreq: amd-pstate: Expose struct amd_cpudata
cpupower: Introduce a new unit test module for AMD P-State driver
Documentation: amd-pstate: Add unit test introduction
Documentation/admin-guide/pm/amd-pstate.rst | 221 +++++++
drivers/cpufreq/amd-pstate.c | 60 +-
include/linux/amd-pstate.h | 74 +++
tools/power/cpupower/debug/kernel/Makefile | 10 +-
.../cpupower/debug/kernel/amd-pstate-ut.c | 618 ++++++++++++++++++
5 files changed, 923 insertions(+), 60 deletions(-)
create mode 100644 include/linux/amd-pstate.h
create mode 100644 tools/power/cpupower/debug/kernel/amd-pstate-ut.c
--
2.25.1
next reply other threads:[~2022-03-23 7:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-23 7:14 Meng Li [this message]
2022-03-23 7:15 ` [PATCH 1/3] cpufreq: amd-pstate: Expose struct amd_cpudata Meng Li
2022-03-23 7:15 ` [PATCH 2/3] cpupower: Introduce a new unit test module for AMD P-State driver Meng Li
2022-03-23 14:15 ` Shuah Khan
2022-03-28 13:57 ` Meng, Li (Jassmine)
2022-03-28 14:56 ` Shuah Khan
2022-03-23 7:15 ` [PATCH 3/3] Documentation: amd-pstate: Add unit test introduction Meng Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220323071502.2674156-1-li.meng@amd.com \
--to=li.meng@amd.com \
--cc=Jinzhou.Su@amd.com \
--cc=Perry.Yuan@amd.com \
--cc=Xiaojian.Du@amd.com \
--cc=alexander.deucher@amd.com \
--cc=bp@alien8.de \
--cc=deepak.sharma@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=nathan.fontenot@amd.com \
--cc=rafael.j.wysocki@intel.com \
--cc=ray.huang@amd.com \
--cc=skhan@linuxfoundation.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox