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: <20141125140440.GF3836@n2100.arm.linux.org.uk>
Date:	Tue, 25 Nov 2014 14:04:41 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Grygorii Strashko <grygorii.strashko@...com>
Cc:	Arnd Bergmann <arnd@...db.de>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Mike Turquette <mturquette@...aro.org>,
	Kevin Hilman <khilman@...nel.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Grant Likely <grant.likely@...retlab.ca>,
	Rob Herring <robh+dt@...nel.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>, ssantosh@...nel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v4 1/2] ARM: keystone: pm: switch to use generic pm
 domains

On Tue, Nov 25, 2014 at 03:30:20PM +0200, Grygorii Strashko wrote:
> On 11/25/2014 02:09 PM, Arnd Bergmann wrote:
> > It might be possible to do this implicitly if the driver calls clk_get(),
> > basically doing clk_get() (or another call if necessary) would prevent the
> > simple pmdomain from turning it off during suspend.
> 
> Unfortunately, clk_get() will not work, because drivers still need to use it
> to get functional clocks even if they are not going to control them explicitly.
> For example, if it need to know clock's rate.

If you don't want a clock to be turned off, then clk_get() it, then
clk_prepare() it, and finally clk_enable() it.

Even if someone else gets it, the only time that a clock is turned off
is when _all_ users of it mutually agree that it can be turned off - by
every user disabling (and possibly unpreparing) it.

So, if the PM domain code gets a clock, prepares and enables it, then
a driver gets the same clock, prepares and enables it also, it won't
be disabled until _both_ the PM domain code _and_ the driver disable
and unprepare the clock.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
--
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