From: Mario Limonciello <mario.limonciello@amd.com>
To: Sven van Ashbrook <svenva@chromium.org>,
Rafael J Wysocki <rafael@kernel.org>, <linux-pm@vger.kernel.org>,
<platform-driver-x86@vger.kernel.org>,
Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>,
David E Box <david.e.box@intel.com>
Cc: S-k Shyam-sundar <Shyam-sundar.S-k@amd.com>,
<rrangel@chromium.org>, "Rajat Jain" <rajatja@google.com>,
Hans de Goede <hdegoede@redhat.com>,
<linux-kernel@vger.kernel.org>,
Mario Limonciello <mario.limonciello@amd.com>,
Mark Gross <markgross@kernel.org>
Subject: [RFC v2 3/3] platform/x86/intel/pmc: core: Report duration of time in HW sleep state
Date: Thu, 10 Nov 2022 00:47:23 -0600 [thread overview]
Message-ID: <20221110064723.8882-4-mario.limonciello@amd.com> (raw)
In-Reply-To: <20221110064723.8882-1-mario.limonciello@amd.com>
intel_pmc_core displays a warning when a suspend didn't get to a HW
sleep state.
This information is generally useful to userspace as well which may use
it to collect further debugging data. Report this to the standard kernel
reporting infrastructure that can be accessed from sysfs.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/platform/x86/intel/pmc/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
index 17ec5825d13d..ef2055209213 100644
--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -2116,6 +2116,8 @@ static __maybe_unused int pmc_core_resume(struct device *dev)
if (!pmcdev->check_counters)
return 0;
+ pm_set_hw_state_residency(pmcdev->s0ix_counter);
+
if (!pmc_core_is_s0ix_failed(pmcdev))
return 0;
--
2.34.1
next prev parent reply other threads:[~2022-11-10 6:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 6:47 [RFC v2 0/3] Introduce infrastructure to report time in hardware " Mario Limonciello
2022-11-10 6:47 ` [RFC v2 1/3] PM: Add a sysfs files to represent sleep duration Mario Limonciello
2022-11-13 23:53 ` Thomas Gleixner
2022-11-14 19:12 ` Limonciello, Mario
2022-11-15 10:32 ` Hans de Goede
2022-11-15 14:13 ` Limonciello, Mario
2022-11-17 2:40 ` Box, David E
2022-11-14 7:12 ` Greg KH
2022-11-15 14:45 ` Rafael J. Wysocki
2022-11-15 15:17 ` Limonciello, Mario
2022-11-15 16:35 ` Rafael J. Wysocki
[not found] ` <CAHQZ30BCXtyJ9qqHHX5eztXbgA_A8yH48+AQVMCB64CXjqE+hQ@mail.gmail.com>
2022-11-15 17:26 ` Limonciello, Mario
2022-11-15 17:52 ` Rafael J. Wysocki
2022-11-15 17:58 ` Limonciello, Mario
2022-11-15 19:08 ` Rafael J. Wysocki
2022-11-10 6:47 ` [RFC v2 2/3] platform/x86/amd: pmc: Report duration of time in deepest hw state Mario Limonciello
2022-11-10 6:47 ` Mario Limonciello [this message]
2022-11-13 23:57 ` [RFC v2 3/3] platform/x86/intel/pmc: core: Report duration of time in HW sleep state Thomas Gleixner
2022-11-14 19:06 ` Limonciello, Mario
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=20221110064723.8882-4-mario.limonciello@amd.com \
--to=mario.limonciello@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=david.e.box@intel.com \
--cc=hdegoede@redhat.com \
--cc=irenic.rajneesh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rajatja@google.com \
--cc=rrangel@chromium.org \
--cc=svenva@chromium.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
all inboxes | Powered by JetHome®