From: Wyes Karny <wyes.karny@amd.com>
To: <linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-pm@vger.kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>, Huang Rui <ray.huang@amd.com>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
<Mario.Limonciello@amd.com>, <Perry.Yuan@amd.com>,
Ananth Narayan <ananth.narayan@amd.com>, <gautham.shenoy@amd.com>,
Wyes Karny <wyes.karny@amd.com>
Subject: [PATCH 4/4] Documentation: amd_pstate: Add amd_pstate state sysfs file
Date: Wed, 7 Dec 2022 15:46:48 +0000 [thread overview]
Message-ID: <20221207154648.233759-5-wyes.karny@amd.com> (raw)
In-Reply-To: <20221207154648.233759-1-wyes.karny@amd.com>
Add documentation for amd_pstate `state` interface.
User can see the current state of the driver with the help of this sysfs
interface:
# cat /sys/devices/system/cpu/amd_pstate/state
# disable [passive] guided
User can load/unload driver with the help of `state` sysfs interface.
- Load driver with passive mode:
# echo passive > /sys/devices/system/cpu/amd_pstate/state
- Unload the driver:
# echo disable > /sys/devices/system/cpu/amd_pstate/state
- To switch to guided mode:
# echo guided > /sys/devices/system/cpu/amd_pstate/state
Signed-off-by: Wyes Karny <wyes.karny@amd.com>
---
Documentation/admin-guide/pm/amd-pstate.rst | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst
index 06e23538f79c..4d3783516ddc 100644
--- a/Documentation/admin-guide/pm/amd-pstate.rst
+++ b/Documentation/admin-guide/pm/amd-pstate.rst
@@ -265,6 +265,17 @@ This attribute is read-only.
Other performance and frequency values can be read back from
``/sys/devices/system/cpu/cpuX/acpi_cppc/``, see :ref:`cppc_sysfs`.
+``state``
+
+``amd_pstate`` also exposes a sysfs interface to view and control the driver state.
+The driver state can be one of the following:
+``disable`` : indicates driver is in unloaded state.
+``passive`` : indicates driver is loaded and currently in passive mode.
+``guided`` : indicates driver is loaded and currenlty in guided autonomous mode.
+This file can be found here: ``/sys/devices/system/cpu/amd_pstate/state``.
+
+To switch to passive mode: ``echo passive > /sys/devices/system/cpu/amd_pstate/state``
+To switch to guided mode: ``echo guided > /sys/devices/system/cpu/amd_pstate/state``
``amd-pstate`` vs ``acpi-cpufreq``
======================================
--
2.34.1
next prev parent reply other threads:[~2022-12-07 15:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 15:46 [PATCH 0/4] amd_pstate: Add guided autonomous mode support Wyes Karny
2022-12-07 15:46 ` [PATCH 1/4] cpufreq: amd_pstate: Add guided autonomous mode Wyes Karny
2022-12-09 7:43 ` Huang Rui
2022-12-09 10:04 ` Wyes Karny
2022-12-07 15:46 ` [PATCH 2/4] Documentation: amd_pstate: Move amd_pstate param to alphabetical order Wyes Karny
2022-12-08 2:42 ` Bagas Sanjaya
2022-12-09 6:43 ` Wyes Karny
2022-12-07 15:46 ` [PATCH 3/4] cpufreq: amd_pstate: Expose sysfs interface to control state Wyes Karny
2022-12-07 15:46 ` Wyes Karny [this message]
2022-12-08 2:59 ` [PATCH 4/4] Documentation: amd_pstate: Add amd_pstate state sysfs file Bagas Sanjaya
2022-12-09 9:01 ` Wyes Karny
2022-12-08 11:48 ` [PATCH 0/4] amd_pstate: Add guided autonomous mode support Rafael J. Wysocki
2022-12-09 14:44 ` Wyes Karny
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=20221207154648.233759-5-wyes.karny@amd.com \
--to=wyes.karny@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Perry.Yuan@amd.com \
--cc=ananth.narayan@amd.com \
--cc=corbet@lwn.net \
--cc=gautham.shenoy@amd.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--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;
as well as URLs for NNTP newsgroup(s).