From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH v2] Add suspend/resume for HPET Date: Sat, 31 Mar 2007 09:53:43 -0700 (PDT) Message-ID: References: <460BBD1B.4040308@ru.mvista.com> <200703291531.18253.maximlevitsky@gmail.com> <200703291546.48996.maximlevitsky@gmail.com> <1175356272.28263.27.camel@localhost.localdomain> <1175358800.28263.36.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1175358800.28263.36.camel@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Thomas Gleixner Cc: Maxim Levitsky , Jeff Chua , linux-ide@vger.kernel.org, Sergei Shtylyov , gregkh@suse.de, linux-pm@lists.osdl.org, Linux Kernel Mailing List , Adrian Bunk , linux-acpi@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz, "Eric W. Biederman" , Jens Axboe , "Michael S. Tsirkin" , Ingo Molnar , jgarzik@pobox.com, Andrew Morton List-Id: linux-ide@vger.kernel.org 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 now the way things work is (iirc - somebody like Greg should = double-check me) is that we add all devices to the power list at = device_add() time by traversing the devices fromt he root all the way out, = and doing a device_add() which does a device_pm_add(), which in turn adds = it to the power-management list - so that the list is always topologically = sorted. 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.. Linus