SUPERH platform development
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: linux-sh@vger.kernel.org
Cc: Linux PM mailing list <linux-pm@lists.linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Alan Stern <stern@rowland.harvard.edu>
Subject: [PATCH 0/2 v2] sh-sci / PM: Fix problem with runtime PM callbacks run with interrupts off
Date: Sun, 21 Aug 2011 19:09:30 +0000	[thread overview]
Message-ID: <201108212109.30399.rjw@sisk.pl> (raw)
In-Reply-To: <201108202131.19479.rjw@sisk.pl>

Hi,

> The sh-sci driver uses pm_runtime_get/put_sync() in such a way
> that they may be run with interrupts off and cause the (recently
> added) might_sleep_if() to trigger in rpm_suspend/resume().
> 
> To avoid that, it's necessary to set the SCI device's power.irq_safe
> flag to indicate that it's runtime PM callbacks may be executed with
> interrupts off safely.  However, the sh-sci driver needs to be able to
> clear that flag sometimes, so a new runtime PM helper for doing that
> is needed.

The previous version of this patchset was not very good as Alan pointed out,
so hopefully this one will be better.

[1/2] - Change PM subsys_data lock type into spinlock.
[2/2] - Make sh-sci use power.irq_safe to indicate that runtime PM callbacks
        may be run with interrupts off.

Thanks,
Rafael


  parent reply	other threads:[~2011-08-21 19:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-20 19:31 [PATCH 0/2] sh-sci / PM: Fix problem with runtime PM callbacks run with interrupts off Rafael J. Wysocki
2011-08-20 19:32 ` [PATCH 1/2] PM / Runtime: Introduce pm_runtime_irq_unsafe() Rafael J. Wysocki
2011-08-21 14:55   ` [linux-pm] " Alan Stern
2011-08-21 18:09     ` Rafael J. Wysocki
2011-08-20 19:33 ` [PATCH 2/2] sh-sci / PM: Use power.irq_safe Rafael J. Wysocki
2011-08-21 19:09 ` Rafael J. Wysocki [this message]
2011-08-21 19:10   ` [PATCH 1/2 v2] PM: Change PM subsys_data lock type into spinlock Rafael J. Wysocki
2011-08-22  6:18     ` [Replacement][PATCH 1/2 v2] PM: Use spinlock instead of mutex in clock management functions Rafael J. Wysocki
2011-08-21 19:11   ` [PATCH 2/2 v2] sh-sci / PM: Use power.irq_safe Rafael J. Wysocki
2011-08-24  5:33     ` Paul Mundt
2011-08-24 20:52       ` Rafael J. Wysocki
2011-08-25  1:33         ` Paul Mundt

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=201108212109.30399.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=stern@rowland.harvard.edu \
    /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