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] [day] [month] [year] [list]
Message-Id: <1535141188-29731-7-git-send-email-rplsssn@codeaurora.org>
Date:   Sat, 25 Aug 2018 01:36:28 +0530
From:   "Raju P.L.S.S.S.N" <rplsssn@...eaurora.org>
To:     andy.gross@...aro.org, david.brown@...aro.org,
        linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org,
        linux-pm@...r.kernel.org
Cc:     rnayak@...eaurora.org, bjorn.andersson@...aro.org,
        linux-kernel@...r.kernel.org, lorenzo.pieralisi@....com,
        rafael@...nel.org, drake@...lessm.com, sboyd@...nel.org,
        evgreen@...omium.org, dianders@...omium.org, mka@...omium.org,
        ilina@...eaurora.org, "Raju P.L.S.S.S.N" <rplsssn@...eaurora.org>
Subject: [PATCH RFC 6/6] drivers: soc: system_pm: Add suspend notifier

The order of suspending different devices, which is part of device
suspend, during pm suspend can't be guaranteed. So once system PM device
flushes the cached sleep/wake requests, other client devices may send
new sleep or wake requests in their device suspend operations. The rpmh
controller needs to manage such new requests if any. A notification is
sent to controller to indicate the same.

Signed-off-by: Raju P.L.S.S.S.N <rplsssn@...eaurora.org>
---
 drivers/soc/qcom/system_pm.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/qcom/system_pm.c b/drivers/soc/qcom/system_pm.c
index 1451bf8..6524f7e 100644
--- a/drivers/soc/qcom/system_pm.c
+++ b/drivers/soc/qcom/system_pm.c
@@ -133,6 +133,7 @@ static int sys_pm_suspend(struct device *dev)
 		/* Flush the sleep/wake sets in RSC controller */
 		rpmh_flush(dev);
 		setup_pdc_wakeup_timer(true);
+		rpmh_notify_suspend(sys_pm_dev, true);
 	} else {
 		pr_err("%s:rpmh controller is busy\n", __func__);
 		return -EBUSY;
@@ -141,8 +142,14 @@ static int sys_pm_suspend(struct device *dev)
 	return 0;
 }
 
+static int sys_pm_resume(struct device *dev)
+{
+	rpmh_notify_suspend(sys_pm_dev, false);
+	return 0;
+}
+
 static const struct dev_pm_ops sys_pm_dev_pm_ops = {
-	SET_LATE_SYSTEM_SLEEP_PM_OPS(sys_pm_suspend, NULL)
+	SET_LATE_SYSTEM_SLEEP_PM_OPS(sys_pm_suspend, sys_pm_resume)
 };
 
 static const struct of_device_id sys_pm_drv_match[] = {
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ