public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: pm list <linux-pm@lists.linux-foundation.org>,
	Pavel Machek <pavel@ucw.cz>,
	linux acpi <linux-acpi@vger.kernel.org>
Subject: Re: [RFD] How to tell ACPI drivers what the target sleep state is (was: Re: [PATCH 1/2] acpi choose sleep state help)
Date: Thu, 21 Jun 2007 00:04:02 -0700	[thread overview]
Message-ID: <200706210004.03544.david-b@pacbell.net> (raw)
In-Reply-To: <200706201332.25486.rjw@sisk.pl>

On Wednesday 20 June 2007, Rafael J. Wysocki wrote:
> On Wednesday, 20 June 2007 08:18, Shaohua Li wrote:
> > On Tue, 2007-06-19 at 13:52 +0200, Rafael J. Wysocki wrote:
> > > On Tuesday, 19 June 2007 04:33, Shaohua Li wrote:
> > > > Based on David's patch
> > > > http://marc.info/?l=linux-acpi&m=117873972806360&w=2
> > > > I slightly changed it.
> > > > 
> > > > Add a helper routine, which gets the sleep state of a ACPI device.
> > > 
> > > Is it going to work with the recent code ordering changes?  I mean,
> > > acpi_pm_prepare() is now called after device_suspend() (and analogously for
> > > the hibernation), so the target ACPI state is not known when the drivers'
> > > .suspend() routines are being called.
>
> > Not. Could pm_message_t have a member indicating the suspend state?
> 
> Well, I thought about that, but I did't know what people on linux-pm would
> think about that.

Let's get rid of pm_message_t entirely.  Didn't we already discuss
how the main reasons for it will vanish if drivers get new PM methods?

 
> Alternatively, we could introduce a pm_target() global PM operation that will
> set the target sleep state for the entire system.

I hope you mean "get the target state"!!

If drivers actually need a handle on that state, that'd be a fair
approach; make it an opaque type though, platform-specific.

But actually I don't see much point to having such a struct.  What
matters is the attributes of the target state (what resources will
be present, especially), and that rarely needs to be indicated by
any kind of cookie.  Consider the "current" task ... it's implicit,
always present (except in IRQ contexts), and hardly ever accessed
despite being more fundamental than "target PM state".

- Dave

  parent reply	other threads:[~2007-06-21  7:04 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1182220394.14837.9.camel@sli10-conroe.sh.intel.com>
     [not found] ` <200706191352.16913.rjw@sisk.pl>
     [not found]   ` <1182320280.30540.4.camel@sli10-conroe.sh.intel.com>
2007-06-20 11:32     ` [RFD] How to tell ACPI drivers what the target sleep state is (was: Re: [PATCH 1/2] acpi choose sleep state help) Rafael J. Wysocki
2007-06-20 11:32     ` Rafael J. Wysocki
     [not found]     ` <200706201332.25486.rjw@sisk.pl>
2007-06-20 14:08       ` Alan Stern
2007-06-21  1:51       ` Len Brown
2007-06-21  7:04       ` David Brownell [this message]
2007-06-21 12:42         ` Rafael J. Wysocki
     [not found]         ` <200706211442.41140.rjw@sisk.pl>
2007-06-21 13:03           ` Pavel Machek
2007-06-21 14:48           ` David Brownell
     [not found]           ` <20070621130312.GB18392@elf.ucw.cz>
2007-06-21 14:46             ` Rafael J. Wysocki
     [not found]             ` <200706211646.06594.rjw@sisk.pl>
2007-06-21 15:23               ` Alan Stern
2007-06-21 16:35               ` David Brownell
     [not found]               ` <200706210935.59004.david-b@pacbell.net>
2007-06-21 19:42                 ` Rafael J. Wysocki
2007-06-21 15:37             ` David Brownell
     [not found]             ` <200706210837.29857.david-b@pacbell.net>
2007-06-21 18:59               ` Pavel Machek
2007-06-21 19:52               ` Rafael J. Wysocki
     [not found]               ` <20070621185910.GH18481@elf.ucw.cz>
2007-06-21 20:03                 ` David Brownell
     [not found]                 ` <200706211303.25004.david-b@pacbell.net>
2007-06-21 20:37                   ` Rafael J. Wysocki
     [not found]           ` <200706210748.48781.david-b@pacbell.net>
2007-06-21 20:04             ` Rafael J. Wysocki
     [not found]             ` <200706212204.36999.rjw@sisk.pl>
2007-06-21 20:22               ` David Brownell
     [not found]               ` <200706211322.06557.david-b@pacbell.net>
2007-06-21 20:41                 ` Rafael J. Wysocki
2007-06-21 15:56         ` Alan Stern
2007-06-21 16:35           ` David Brownell
     [not found]       ` <200706202151.15056.lenb@kernel.org>
2007-06-21  7:10         ` David Brownell
     [not found] <Pine.LNX.4.44L0.0706201006190.3311-100000@iolanthe.rowland.org>
2007-06-20 14:36 ` Rafael J. Wysocki
2007-06-21  6:57 ` David Brownell

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=200706210004.03544.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.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