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: <CAPDyKFpJzuzB_7=eH7iNV69TLOTbdBCTx3CgqPTkianZCctKag@mail.gmail.com>
Date:	Mon, 25 Feb 2013 10:27:36 +0100
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Lee Jones <lee.jones@...aro.org>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	sameo@...ux.intel.com, arnd@...db.de, linus.walleij@...ricsson.com,
	Daniel WILLERUD <daniel.willerud@...ricsson.com>
Subject: Re: [PATCH 01/35] mfd: ab8500-gpadc: Implemented suspend/resume

On 22 February 2013 11:38, Mark Brown
<broonie@...nsource.wolfsonmicro.com> wrote:
> On Thu, Feb 21, 2013 at 11:45:08PM +0100, Ulf Hansson wrote:
>> On 20 February 2013 14:19, Mark Brown
>
>> > This doesn't look especially sane...  You're doing a runtime get, taking
>> > the lock without releasing it and disabling the regulator.  This is
>> > *very* odd, both the changelog and the code need to explain what's going
>> > on and why it's safe in a lot more detail here.
>
>> You need to do pm_runtime_get_sync to be able to make sure resources
>> (which seems to be only the regulator) are safe to switch off. To my
>> understanding this is a generic way to use for being able to switch
>> off resources at a device suspend when runtime pm is used in
>> conjunction.
>
> Are you sure this actually does what you think it does, especially when
> run on modern kernels?

Not sure, what you are thinking of more precisely here. Runtime pm has
been in the kernel for quite some time now.

Anyway, to make it a bit clearer, we switch the regulator on/off at
the runtime suspend/resume callbacks. We want to take similar actions
in device suspend/resume.
To accomplish this a pm_runtime_get_sync is done in suspend and vice
verse in resume, otherwise you can not safely handle the regulator.

Kind regards
Ulf Hansson
--
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