public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: linux-pm@lists.linux-foundation.org
Cc: Pavel Machek <pavel@ucw.cz>,
	kernel list <linux-kernel@vger.kernel.org>,
	Linux-pm mailing list <linux-pm@lists.osdl.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>, Andrew Morton <akpm@osdl.org>
Subject: Re: [linux-pm] s2ram: warn when interrupts should be disabled but are not
Date: Sun, 13 Apr 2008 22:24:27 -0700	[thread overview]
Message-ID: <200804132224.27792.david-b@pacbell.net> (raw)
In-Reply-To: <20080412095311.GA1729@elf.ucw.cz>

On Saturday 12 April 2008, Pavel Machek wrote:
> +                                       WARN_ON(!irqs_disabled());
>                                         ret = drv->suspend(sysdev, state);

Wouldn't it be better to assert the warning AFTER the
driver had a chance to screw it up?  (On the resume
side of things too.)

We know IRQs were disabled on entry to the loop.
If something went wrong it was some goofy driver.
Best warn about it ASAP instead of *maybe* getting
a warning before the next driver (if there is one).

And if you're concerned about such issues, I'd think
similar warnings would be done in suspend_late() and
resume_early() support...

- Dave

  parent reply	other threads:[~2008-04-14  5:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-12  9:53 s2ram: warn when interrupts should be disabled but are not Pavel Machek
2008-04-12 15:36 ` [linux-pm] " Alan Stern
2008-04-12 19:11   ` Pavel Machek
2008-04-14  5:24 ` David Brownell [this message]
2008-04-15  6:48 ` Andrew Morton

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=200804132224.27792.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-pm@lists.osdl.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    /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