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: <7hwqc7nqye.fsf@paris.lan>
Date:	Mon, 23 Jun 2014 16:31:21 -0700
From:	Kevin Hilman <khilman@...aro.org>
To:	Doug Anderson <dianders@...omium.org>
Cc:	Wolfram Sang <wsa@...-dreams.de>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Tomasz Figa <tomasz.figa@...il.com>,
	Javier Martinez Canillas <javier.martinez@...labora.co.uk>,
	naveen krishna <ch.naveen@...sung.com>,
	Jingoo Han <jg1.han@...sung.com>,
	Jean Delvare <jdelvare@...e.de>, Simon Glass <sjg@...gle.com>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Masanari Iida <standby24x7@...il.com>,
	Sachin Kamat <sachin.kamat@...aro.org>,
	"linux-i2c\@vger.kernel.org" <linux-i2c@...r.kernel.org>,
	"linux-arm-kernel\@lists.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] i2c: exynos5: Properly use the "noirq" variants of suspend/resume

Doug Anderson <dianders@...omium.org> writes:

> Kevin,
>
> On Mon, Jun 23, 2014 at 3:23 PM, Kevin Hilman <khilman@...aro.org> wrote:
>>> So I guess in this case the truly correct way to handle it is:
>>>
>>> 1. i2c controller should have Runtime PM even though (as per the code
>>> now) there's nothing you can do to it to save power under normal
>>> circumstances.  So the runtime "suspend" code would be a no-op.
>>>
>>> 2. When the i2c controller is told to runtime resume, it should
>>> double-check if a full SoC poweroff has happened since the last time
>>> it checked.  In this case it should reinit its hardware.
>>>
>>> 3. If the i2c controller gets a full "resume" callback then it should
>>> also reinit the hardware just so it's not sitting in a half-configured
>>> state until the first peripheral uses it.
>>>
>>> If later someone finds a way to power gate the i2c controller when no
>>> active transfers are going (and we actually save non-trivial power
>>> doing this) then we've got a nice place to put that code.
>>>
>>> NOTE: Unless we can actually save power by power gating the i2c
>>> peripheral when there are no active transfers, we would also just have
>>> the i2c_xfer() init the hardware if needed.  Maybe that's kinda gross,
>>> though.
>>
>> Yes, this is how we manage the i2c controller on OMAP.
>>
>> Essentially, between every xfer, the hw is disabled and can potentially
>> lose context, so eveery xfer requires a hw init.  We use the runtime PM
>> "autosuspend" feature so that it stays alive for X milliseconds so
>> bursty i2c xfers are not punished.
>>
>> Have a look at drivers/i2c/busses/i2c-omap.c.
>>
>> You'll notice there are not callbacks for system suspend/resume, it's
>> only doing runtime PM.
>
> OK, cool!  That might be a bit too aggressive of a change for what I
> can take on right now.  I've filed http://crbug.com/388007 to see if
> Samsung can take a look at this.

Sure.  While I think moving to runtime PM is the right thing to do, that
alone shouldn't block this patch.

Kevin
--
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