From: David Brownell <david-b@pacbell.net>
To: linux-pm@lists.linux-foundation.org
Cc: Adrian Bunk <bunk@stusta.de>,
Andrew Morton <akpm@linux-foundation.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
gregkh@suse.de, Ingo Molnar <mingo@elte.hu>,
Jeff Chua <jeff.chua.linux@gmail.com>,
Jens Axboe <jens.axboe@oracle.com>,
jgarzik@pobox.com, Linus Torvalds <torvalds@linux-foundation.org>,
linux-acpi@vger.kernel.org, linux-ide@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-pci@atrey.karlin.mff.cuni.cz,
Maxim Levitsky <maximlevitsky@gmail.com>,
"Michael S. Tsirkin" <mst@mellanox.co.il>,
Sergei Shtylyov <sshtylyov@ru.mvista.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [linux-pm] [PATCH v2] Add suspend/resume for HPET
Date: Sat, 31 Mar 2007 12:32:56 -0700 [thread overview]
Message-ID: <200703311232.57505.david-b@pacbell.net> (raw)
In-Reply-To: <200703311118.55132.david-b@pacbell.net>
On Saturday 31 March 2007 11:18 am, David Brownell wrote:
> ( please remove obsolute linux-pm@lists.osdl.org from further messages!! )
>
> On Saturday 31 March 2007 10:02 am, Ingo Molnar wrote:
> >
> > i dont think there's any particular problem here because suspend/resume
> > wont be done during bootup - but we might need a way to move a device to
> > earlier spots in the device tree, even if they got registered later on -
> > instead of forcing the time devices to be registered very early?
>
> I'm about ready to test the appended patch... a "move one device" call
> might be safest at this point in the release cycle though.
As expected, this behaved OK on an x86 laptop. I'll see if it breaks
some of the ARM boards I have handy.
To be clear, what this means is that if "clockevent" and "clocksource"
devices get registered "very early", and the various clockevent and
clock source devices get registered, then the suspend/resume methods
for those will all get grouped together ... suspended "very late" and
resumed "very early", regardless of when they get registered. Pretty
much the driver model parts of what Linus was suggesting; clockevent
bits would still be needed.
- Dave
> - Dave
>
> ======================== SNIP!
> Change how the PM list is constructed, so that devices are added right
> after their parents (when they have one) rather than at the end of the
> list. This preserves sequencing guarantees, but enables sequencing of
> suspend/resume operations by more important characteristics than "when
> device happened to enumerate" ... e.g. clocksources and clockevents
> at a clearly defined point during suspend and resume.
>
> This patch has a potential downside for devices that have multiple
> power dependencies and which "just happened to work" before.
>
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
>
> --- g26.orig/drivers/base/power/main.c 2006-07-02 12:30:30.000000000 -0700
> +++ g26/drivers/base/power/main.c 2007-03-31 11:02:28.000000000 -0700
> @@ -52,12 +52,17 @@ EXPORT_SYMBOL_GPL(device_pm_set_parent);
> int device_pm_add(struct device * dev)
> {
> int error;
> + struct device *parent = dev->parent;
>
> - pr_debug("PM: Adding info for %s:%s\n",
> - dev->bus ? dev->bus->name : "No Bus", dev->kobj.name);
> + pr_debug("PM: Adding info for %s:%s, after %s\n",
> + dev->bus ? dev->bus->name : "No Bus", dev->kobj.name,
> + parent ? parent->bus_id : "(no parent)");
> down(&dpm_list_sem);
> - list_add_tail(&dev->power.entry, &dpm_active);
> - device_pm_set_parent(dev, dev->parent);
> + if (parent)
> + list_add(&dev->power.entry, &parent->power.entry);
> + else
> + list_add_tail(&dev->power.entry, &dpm_active);
> + device_pm_set_parent(dev, parent);
> if ((error = dpm_sysfs_add(dev)))
> list_del(&dev->power.entry);
> up(&dpm_list_sem);
>
next prev parent reply other threads:[~2007-03-31 19:33 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.64.0703160925270.26106@woody.linux-foundation.org>
2007-03-18 18:49 ` [2/6] 2.6.21-rc4: known regressions Adrian Bunk
2007-03-18 18:49 ` [3/6] " Adrian Bunk
2007-03-26 1:25 ` Jeff Chua
2007-03-26 4:05 ` Adrian Bunk
2007-03-26 5:37 ` Jeff Chua
2007-03-26 16:26 ` Thomas Gleixner
2007-03-26 17:46 ` Jeff Chua
2007-03-28 7:04 ` Thomas Gleixner
2007-03-28 13:43 ` Maxim
2007-03-28 14:41 ` Ingo Molnar
2007-03-28 15:01 ` Maxim
2007-03-28 16:38 ` Linus Torvalds
2007-03-28 19:38 ` David Brownell
2007-03-28 20:19 ` [linux-pm] " Maxim
2007-03-28 20:59 ` David Brownell
2007-03-28 21:27 ` Maxim
2007-03-29 22:33 ` David Brownell
2007-03-29 23:29 ` Maxim Levitsky
2007-03-30 0:09 ` [linux-pm] " David Brownell
2007-03-30 0:48 ` Maxim Levitsky
2007-03-28 20:42 ` Linus Torvalds
2007-03-28 21:17 ` [linux-pm] " David Brownell
2007-03-28 22:26 ` Maxim
2007-03-29 4:41 ` [ PATCH] Add suspend/resume for HPET was: " Maxim
2007-03-29 5:08 ` Linus Torvalds
2007-03-29 5:47 ` Maxim
2007-03-29 13:20 ` Sergei Shtylyov
2007-03-29 13:31 ` Maxim
2007-03-29 13:46 ` [PATCH v2] Add suspend/resume for HPET Maxim Levitsky
2007-03-29 16:53 ` Linus Torvalds
2007-03-29 17:28 ` Maxim Levitsky
2007-03-29 17:51 ` Ingo Molnar
2007-03-29 20:46 ` Andi Kleen
2007-03-29 18:11 ` Jeff Chua
2007-03-31 15:51 ` Thomas Gleixner
2007-03-31 16:01 ` Jeff Chua
2007-03-31 16:09 ` Thomas Gleixner
2007-03-31 16:09 ` Linus Torvalds
2007-03-31 16:33 ` Thomas Gleixner
2007-03-31 16:41 ` Greg KH
2007-03-31 16:53 ` Linus Torvalds
2007-03-31 17:02 ` Ingo Molnar
2007-03-31 18:18 ` [linux-pm] " David Brownell
2007-03-31 19:32 ` David Brownell [this message]
2007-04-01 3:13 ` Jeff Chua
2007-04-01 4:13 ` David Brownell
2007-03-31 17:08 ` Greg KH
2007-03-31 17:55 ` [linux-pm] " David Brownell
2007-03-31 16:56 ` Maxim Levitsky
2007-03-31 17:09 ` Linus Torvalds
2007-03-31 17:17 ` Ingo Molnar
2007-03-31 17:58 ` Daniel Walker
2007-03-29 16:35 ` [ PATCH] Add suspend/resume for HPET was: Re: [3/6] 2.6.21-rc4: known regressions Linus Torvalds
2007-03-29 16:51 ` Maxim Levitsky
2007-03-29 17:22 ` Linus Torvalds
2007-03-29 17:47 ` [patch, v2] add suspend/resume for HPET Ingo Molnar
2007-03-28 18:04 ` [3/6] 2.6.21-rc4: known regressions Michael S. Tsirkin
2007-03-28 18:32 ` Ingo Molnar
2007-03-28 18:35 ` Randy Dunlap
2007-03-29 14:24 ` Jeff Chua
2007-03-23 18:48 ` [2/5] 2.6.21-rc4: known regressions (v2) Adrian Bunk
2007-03-26 10:01 ` Tejun Heo
2007-03-23 18:50 ` [3/5] " Adrian Bunk
2007-03-23 19:07 ` Maxim
2007-03-24 17:04 ` Thomas Meyer
2007-03-24 18:02 ` Eric W. Biederman
2007-03-23 18:50 ` [4/5] " Adrian Bunk
2007-03-24 11:25 ` 2.6.21-rc4: known regressions with patches (v2) Adrian Bunk
2007-03-26 12:37 ` Bob Tracy
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=200703311232.57505.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@linux-foundation.org \
--cc=bunk@stusta.de \
--cc=ebiederm@xmission.com \
--cc=gregkh@suse.de \
--cc=jeff.chua.linux@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=jgarzik@pobox.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=linux-pm@lists.linux-foundation.org \
--cc=maximlevitsky@gmail.com \
--cc=mingo@elte.hu \
--cc=mst@mellanox.co.il \
--cc=sshtylyov@ru.mvista.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).