[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200703311055.43407.david-b@pacbell.net>
Date: Sat, 31 Mar 2007 10:55:42 -0700
From: David Brownell <david-b@...bell.net>
To: linux-pm@...ts.linux-foundation.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Maxim Levitsky <maximlevitsky@...il.com>,
Jeff Chua <jeff.chua.linux@...il.com>,
linux-ide@...r.kernel.org,
Sergei Shtylyov <sshtylyov@...mvista.com>, gregkh@...e.de,
linux-pm@...ts.osdl.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Adrian Bunk <bunk@...sta.de>, linux-acpi@...r.kernel.org,
linux-pci@...ey.karlin.mff.cuni.cz,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Jens Axboe <jens.axboe@...cle.com>,
"Michael S. Tsirkin" <mst@...lanox.co.il>,
Ingo Molnar <mingo@...e.hu>, jgarzik@...ox.com,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [linux-pm] [PATCH v2] Add suspend/resume for HPET
On Saturday 31 March 2007 9:53 am, Linus Torvalds wrote:
>
> On Sat, 31 Mar 2007, Thomas Gleixner wrote:
> >
> > Right, but clock - sources/events need to be extremly late suspended and
> > early resumed. How can we ensure this ?
>
> Make them be at the top of the device tree by adding them early. That's
> the whole point of the device tree after all - we have an ordering that is
> enforced by its topology, and that we sort by when things were added.
Right, but "when things get added" doesn't correlate well to
"when they should get suspended/resumed". It's also in basic
conflict with runtime PM models, where devices may be suspended
at essentially any time. And sysdevs are even stranger.
One way out: rather than constructing that list as devices get
enumerated, it could be constructed by a (linear-time, non-recursive)
walk of the device tree(s) before they get suspended.
(Or equivalently: construct lists at enumeration time, but just
adding them *right after their parent* rather than at the end of
the list.)
Would that solve the problem here? Potentially ... if the tree is
structured to meet Thomas' rules:
> > The required resume order is:
> >
> > clocksources
> > timekeeping
> > clockevents
> > tick management
> So the only thing that needs to be done is to make sure that we add the
> timer devices early during bootup - something we have to do *anyway*. If a
> device is added early in bootup, that automatically means that it will be
> suspended late, and resumed early - because we maintain that order all the
> way through..
> -- "clocksource" -- +-- HPET
> |
> +-- TSC
> |
> +-- i8259
> |
> +-- lapic timer
> |
> .. whatever else
If each of those were a device node, with "clocksource" suspend/resume
methods handling Thomas' "timekeeping" item, and simlarly for "clockevent"
devices ... I could see that all working neatly.
- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists