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-next>] [day] [month] [year] [list]
Message-ID: <1415808047-23455-1-git-send-email-grygorii.strashko@ti.com>
Date:	Wed, 12 Nov 2014 18:00:47 +0200
From:	Grygorii Strashko <grygorii.strashko@...com>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
	<linux-pm@...r.kernel.org>
CC:	Ulf Hansson <ulf.hansson@...aro.org>, <khilman@...aro.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, <k.kozlowski@...sung.com>,
	Grygorii Strashko <grygorii.strashko@...com>
Subject: [PATCH] PM / Domains: restore calling of .suspend/resume_noirq() callbacks

Now .suspend/resume_noirq() callbacks will not be called during
system wide suspend/resume for devices which belongs to some GPD.
It seems, that this change was accidently introduced by
commit d23b9b00cdde ("PM / Domains: Rework system suspend callback
 routines (v2)").

This patch restores calling of .suspend/resume_noirq() callbacks
for devices from GPD during system wide suspend/resume.

Signed-off-by: Grygorii Strashko <grygorii.strashko@...com>
---
 drivers/base/power/domain.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index fb83d4a..f8c70e6 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1014,6 +1014,7 @@ static int pm_genpd_suspend_late(struct device *dev)
 static int pm_genpd_suspend_noirq(struct device *dev)
 {
 	struct generic_pm_domain *genpd;
+	int ret;
 
 	dev_dbg(dev, "%s()\n", __func__);
 
@@ -1021,8 +1022,14 @@ static int pm_genpd_suspend_noirq(struct device *dev)
 	if (IS_ERR(genpd))
 		return -EINVAL;
 
-	if (genpd->suspend_power_off
-	    || (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)))
+	if (genpd->suspend_power_off)
+		return 0;
+
+	ret = pm_generic_suspend_noirq(dev);
+	if (ret)
+		return ret;
+
+	if (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev))
 		return 0;
 
 	genpd_stop_dev(genpd, dev);
@@ -1065,8 +1072,9 @@ static int pm_genpd_resume_noirq(struct device *dev)
 	 */
 	pm_genpd_sync_poweron(genpd);
 	genpd->suspended_count--;
+	genpd_start_dev(genpd, dev);
 
-	return genpd_start_dev(genpd, dev);
+	return pm_generic_resume_noirq(dev);
 }
 
 /**
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ