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:	Wed, 29 Jun 2016 21:52:13 +0800
From:	Dong Aisheng <aisheng.dong@....com>
To:	<linux-clk@...r.kernel.org>
CC:	<linux-kernel@...r.kernel.org>, <sboyd@...eaurora.org>,
	<mturquette@...libre.com>, <shawnguo@...nel.org>,
	<linux-arm-kernel@...ts.infradead.org>, <tglx@...utronix.de>,
	<aisheng.dong@....com>, <stefan@...er.ch>,
	<l.stach@...gutronix.de>, <cyrille.pitchen@...el.com>,
	<manabian@...il.com>, <anson.huang@....com>
Subject: [PATCH RFC 5/7] clk: use polling way for SYSTEM_SUSPEND state too

During SYSTEM_SUSPEND state, the arch irq is disabled and there's
no way to sleep. Using polling for it too.

Signed-off-by: Dong Aisheng <aisheng.dong@....com>
---
 drivers/clk/clk.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 9369dbb71118..5091ec9bd665 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -601,7 +601,8 @@ static void clk_core_unprepare(struct clk_core *core)
 						__func__, core->name);
 					break;
 				}
-				if (system_state == SYSTEM_BOOTING)
+				if (system_state == SYSTEM_BOOTING ||
+				    system_state == SYSTEM_SUSPEND)
 					/*
 					 * Busy loop as we can't schedule in
 					 * early boot
@@ -670,7 +671,8 @@ static int clk_core_prepare(struct clk_core *core)
 						ret = -ETIMEDOUT;
 						break;
 					}
-					if (system_state == SYSTEM_BOOTING)
+					if (system_state == SYSTEM_BOOTING ||
+					    system_state == SYSTEM_SUSPEND)
 						/*
 						 * Busy loop as we can't
 						 * schedule in early boot
@@ -1256,7 +1258,8 @@ static int __clk_set_parent(struct clk_core *core, struct clk_core *parent,
 					ret = -ETIMEDOUT;
 					break;
 				}
-				if (system_state == SYSTEM_BOOTING)
+				if (system_state == SYSTEM_BOOTING ||
+				    system_state == SYSTEM_SUSPEND)
 					/*
 					 * Busy loop as we can't
 					 * schedule in early boot
@@ -1550,7 +1553,8 @@ static void clk_change_rate(struct clk_core *core)
 							__func__, core->name);
 						break;
 					}
-					if (system_state == SYSTEM_BOOTING)
+					if (system_state == SYSTEM_BOOTING ||
+					    system_state == SYSTEM_SUSPEND)
 						/*
 						 * Busy loop as we can't
 						 * schedule in early boot
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ