All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kyle Moffett <mrmacman_g4@mac.com>
Cc: Pavel Machek <pavel@ucw.cz>, Marc Ballarin <Ballarin.Marc@gmx.de>,
	akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: Calling suspend() in halt/restart/shutdown -> not a good idea
Date: Wed, 03 Aug 2005 21:59:14 +0200	[thread overview]
Message-ID: <1123099155.30257.43.camel@gaston> (raw)
In-Reply-To: <D6591B2F-4E98-48A0-A3DD-71AAC564278E@mac.com>

On Wed, 2005-08-03 at 12:53 -0400, Kyle Moffett wrote:
> On Aug 3, 2005, at 07:40:54, Benjamin Herrenschmidt wrote:
> >> I'd like to get rid of shutdown callback. Having two copies of code
> >> (one in callback, one in suspend) is ugly.
> >
> > Well, it's obviously not a good time for this. First, suspend and
> > shutdown don't necessarily do the same thing, then it just doesn't  
> > work
> > in practice. So either do it right completely or not at all, but  
> > 2.6.13
> > isn't the place for an half-assed hack that looks like a solution to
> > you.
> 
> One possible way to proceed might be to add a new callback that takes a
> pm_message_t: powerdown()  If it exists, it would be called in both the
> suspend and shutdown paths, before the suspend() and shutdown() calls to
> that driver are made.  As drivers are fixed to clean up and combine that
> code, they could put the merged result into the powerdown() function,
> and remove their suspend() and shutdown() functions.

We already have shutdown() for that.

Ben.



  reply	other threads:[~2005-08-03 20:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-01 15:09 Calling suspend() in halt/restart/shutdown -> not a good idea Benjamin Herrenschmidt
2005-08-01 18:37 ` Marc Ballarin
2005-08-01 20:08   ` Benjamin Herrenschmidt
2005-08-02  9:54     ` Pavel Machek
2005-08-03 11:40       ` Benjamin Herrenschmidt
2005-08-03 16:53         ` Kyle Moffett
2005-08-03 19:59           ` Benjamin Herrenschmidt [this message]
2005-08-04 20:56           ` Pavel Machek
2005-08-04 21:04         ` Pavel Machek
2005-08-02  9:53 ` Pavel Machek
2005-08-02 14:40   ` Eric W. Biederman
2005-08-02 14:45     ` Pavel Machek
2005-08-03 11:43       ` Benjamin Herrenschmidt
2005-08-03 11:43     ` Benjamin Herrenschmidt
2005-08-03 11:38   ` Benjamin Herrenschmidt
2005-08-04  2:27     ` Andrew Morton
2005-08-02 10:04 ` Pavel Machek
2005-08-03 11:41   ` Benjamin Herrenschmidt

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=1123099155.30257.43.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=Ballarin.Marc@gmx.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    --cc=pavel@ucw.cz \
    /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.