lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221031204320.22464-4-mario.limonciello@amd.com>
Date:   Mon, 31 Oct 2022 15:43:19 -0500
From:   Mario Limonciello <mario.limonciello@....com>
To:     Sven van Ashbrook <svenva@...omium.org>,
        Rafael J Wysocki <rafael@...nel.org>,
        Rajneesh Bhardwaj <irenic.rajneesh@...il.com>,
        "David E Box" <david.e.box@...el.com>
CC:     S-k Shyam-sundar <Shyam-sundar.S-k@....com>,
        <rrangel@...omium.org>, <platform-driver-x86@...r.kernel.org>,
        Rajat Jain <rajatja@...gle.com>,
        "Hans de Goede" <hdegoede@...hat.com>,
        Mario Limonciello <mario.limonciello@....com>,
        Mark Gross <markgross@...nel.org>,
        <linux-kernel@...r.kernel.org>
Subject: [RFC 3/3] platform/x86/intel/pmc: core: Report duration of time in deepest HW state

intel_pmc_core displays a warning when a suspend didn't get to the deepest
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@....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 17ec5825d13d7..9e58228b01f91 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_deepest_state(pmcdev->s0ix_counter);
+
 	if (!pmc_core_is_s0ix_failed(pmcdev))
 		return 0;
 
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ