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]
Date:   Thu, 10 Nov 2022 00:47:22 -0600
From:   Mario Limonciello <mario.limonciello@....com>
To:     Sven van Ashbrook <svenva@...omium.org>,
        Rafael J Wysocki <rafael@...nel.org>,
        <linux-pm@...r.kernel.org>, <platform-driver-x86@...r.kernel.org>,
        Shyam Sundar S K <Shyam-sundar.S-k@....com>
CC:     Rajneesh Bhardwaj <irenic.rajneesh@...il.com>,
        <rrangel@...omium.org>, Rajat Jain <rajatja@...gle.com>,
        David E Box <david.e.box@...el.com>,
        "Hans de Goede" <hdegoede@...hat.com>,
        <linux-kernel@...r.kernel.org>,
        "Mario Limonciello" <mario.limonciello@....com>,
        Mark Gross <markgross@...nel.org>
Subject: [RFC v2 2/3] platform/x86/amd: pmc: Report duration of time in deepest hw state

amd_pmc displays a warning when a suspend didn't get to the deepest
state and a dynamic debugging message with the duration if it did.

Rather than logging to dynamic debugging the duration spent in the
deepest state, 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/amd/pmc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
index 96e790e639a2..e583bf966f47 100644
--- a/drivers/platform/x86/amd/pmc.c
+++ b/drivers/platform/x86/amd/pmc.c
@@ -363,9 +363,7 @@ static void amd_pmc_validate_deepest(struct amd_pmc_dev *pdev)
 
 	if (!table.s0i3_last_entry_status)
 		dev_warn(pdev->dev, "Last suspend didn't reach deepest state\n");
-	else
-		dev_dbg(pdev->dev, "Last suspend in deepest state for %lluus\n",
-			 table.timein_s0i3_lastcapture);
+	pm_set_hw_state_residency(table.s0i3_last_entry_status ? table.timein_s0i3_lastcapture : 0);
 }
 #endif
 
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ