linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ulf.hansson@stericsson.com (Ulf Hansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] AMBA: Use suspend_noriq to force devices into runtime suspend
Date: Fri, 28 Oct 2011 10:12:42 +0200	[thread overview]
Message-ID: <4EAA63FA.8050506@stericsson.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1110271206450.2004-100000@iolanthe.rowland.org>

Alan Stern wrote:
> On Thu, 27 Oct 2011, Ulf Hansson wrote:
> 
>> To be able to make sure devices are put into runtime suspend
>> after a suspend sequence, the suspend_noirq callback is used.
>>
>> Previously it was was possible for drivers doing pm_runtime_suspend
>> and pm_runtime_put_sync directly from it's suspend callbacks.
>> This is now not possible due to the following commit, which solve a
>> race issue:
>>
>> PM: Limit race conditions between runtime PM and system sleep (v2)
> 
> I have a small request for this patch:
> 
>> +static int amba_pm_runtime_suspend_noirq(struct device *dev)
>> +{
> ...
>> +}
> 
>> +static int amba_pm_runtime_resume_noirq(struct device *dev)
>> +{
> ...
>> +}
> 
> Can the names of these functions be changed?  Since they run during
> system sleep transitions with IRQs disabled, they aren't really runtime
> suspend or resume routines.

Sure, we can rename/move the code - do you have a proposal? :-)

The idea with having them as separate functions and something with 
"runtime" in the name is because it is only when having 
CONFIG_PM_RUNTIME the functions actually does something.

If I move the the code into amba_pm_suspend|resume_noirq I will need 
ifdefs around the code. I am fine with that as well...

> 
> In fact, since each routine is used in only one place, maybe they can 
> be eliminated entirely and moved into their callers?
> 
> Alan Stern
> 
> 

BR
Ulf Hansson

  reply	other threads:[~2011-10-28  8:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-27 15:48 [PATCH] AMBA: Use suspend_noriq to force devices into runtime suspend Ulf Hansson
2011-10-27 15:54 ` Russell King - ARM Linux
2011-10-27 18:27   ` Linus Walleij
2011-10-27 19:48     ` Russell King - ARM Linux
2011-10-28  9:29       ` Ulf Hansson
2011-11-02  9:02         ` Russell King - ARM Linux
2011-11-02 10:55           ` Ulf Hansson
2011-11-02 12:51             ` Russell King - ARM Linux
2011-10-27 16:10 ` Alan Stern
2011-10-28  8:12   ` Ulf Hansson [this message]
2011-10-28 15:18     ` Alan Stern
2011-11-01  9:32       ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EAA63FA.8050506@stericsson.com \
    --to=ulf.hansson@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).