All of lore.kernel.org
 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 2/2 v2] sh-sci / PM: Use power.irq_safe
Date: Sun, 21 Aug 2011 19:11:44 +0000	[thread overview]
Message-ID: <201108212111.45012.rjw@sisk.pl> (raw)
In-Reply-To: <201108212109.30399.rjw@sisk.pl>

From: Rafael J. Wysocki <rjw@sisk.pl>

Since sci_port_enable() and sci_port_disable() may be run with
interrupts off and they execute pm_runtime_get_sync() and
pm_runtime_put_sync(), respectively, the SCI device's
power.irq_safe flags has to be used to indicate that it is safe
to execute runtime PM callbacks for this device with interrupts off.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/tty/serial/sh-sci.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux/drivers/tty/serial/sh-sci.c
=================================--- linux.orig/drivers/tty/serial/sh-sci.c
+++ linux/drivers/tty/serial/sh-sci.c
@@ -1913,6 +1913,7 @@ static int __devinit sci_init_single(str
 
 		port->dev = &dev->dev;
 
+		pm_runtime_irq_safe(&dev->dev);
 		pm_runtime_enable(&dev->dev);
 	}
 


WARNING: multiple messages have this Message-ID (diff)
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 2/2 v2] sh-sci / PM: Use power.irq_safe
Date: Sun, 21 Aug 2011 21:11:44 +0200	[thread overview]
Message-ID: <201108212111.45012.rjw@sisk.pl> (raw)
In-Reply-To: <201108212109.30399.rjw@sisk.pl>

From: Rafael J. Wysocki <rjw@sisk.pl>

Since sci_port_enable() and sci_port_disable() may be run with
interrupts off and they execute pm_runtime_get_sync() and
pm_runtime_put_sync(), respectively, the SCI device's
power.irq_safe flags has to be used to indicate that it is safe
to execute runtime PM callbacks for this device with interrupts off.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/tty/serial/sh-sci.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux/drivers/tty/serial/sh-sci.c
===================================================================
--- linux.orig/drivers/tty/serial/sh-sci.c
+++ linux/drivers/tty/serial/sh-sci.c
@@ -1913,6 +1913,7 @@ static int __devinit sci_init_single(str
 
 		port->dev = &dev->dev;
 
+		pm_runtime_irq_safe(&dev->dev);
 		pm_runtime_enable(&dev->dev);
 	}
 


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

Thread overview: 35+ 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:31 ` Rafael J. Wysocki
2011-08-20 19:32 ` [PATCH 1/2] PM / Runtime: Introduce pm_runtime_irq_unsafe() Rafael J. Wysocki
2011-08-20 19:32   ` Rafael J. Wysocki
2011-08-21 14:55   ` [linux-pm] " Alan Stern
2011-08-21 14:55     ` Alan Stern
2011-08-21 18:09     ` Rafael J. Wysocki
2011-08-21 18:09     ` [linux-pm] " Rafael J. Wysocki
2011-08-21 18:09       ` Rafael J. Wysocki
2011-08-21 14:55   ` Alan Stern
2011-08-20 19:32 ` Rafael J. Wysocki
2011-08-20 19:33 ` [PATCH 2/2] sh-sci / PM: Use power.irq_safe Rafael J. Wysocki
2011-08-20 19:33   ` Rafael J. Wysocki
2011-08-20 19:33 ` Rafael J. Wysocki
2011-08-21 19:09 ` [PATCH 0/2 v2] sh-sci / PM: Fix problem with runtime PM callbacks run with interrupts off Rafael J. Wysocki
2011-08-21 19:09 ` Rafael J. Wysocki
2011-08-21 19:09   ` Rafael J. Wysocki
2011-08-21 19:10   ` [PATCH 1/2 v2] PM: Change PM subsys_data lock type into spinlock Rafael J. Wysocki
2011-08-21 19:10     ` 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-22  6:18       ` Rafael J. Wysocki
2011-08-22  6:18     ` Rafael J. Wysocki
2011-08-21 19:10   ` [PATCH 1/2 v2] PM: Change PM subsys_data lock type into spinlock Rafael J. Wysocki
2011-08-21 19:11   ` Rafael J. Wysocki [this message]
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  5:33       ` Paul Mundt
2011-08-24 20:52       ` Rafael J. Wysocki
2011-08-24 20:52         ` Rafael J. Wysocki
2011-08-25  1:33         ` Paul Mundt
2011-08-25  1:33           ` Paul Mundt
2011-08-25  1:33         ` Paul Mundt
2011-08-24 20:52       ` Rafael J. Wysocki
2011-08-24  5:33     ` Paul Mundt
2011-08-21 19:11   ` Rafael J. Wysocki

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=201108212111.45012.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.