Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265834AbUATWGV (ORCPT ); Tue, 20 Jan 2004 17:06:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265836AbUATWGQ (ORCPT ); Tue, 20 Jan 2004 17:06:16 -0500 Received: from smtp2.clear.net.nz ([203.97.37.27]:3713 "EHLO smtp2.clear.net.nz") by vger.kernel.org with ESMTP id S265834AbUATWEW (ORCPT ); Tue, 20 Jan 2004 17:04:22 -0500 Date: Wed, 21 Jan 2004 11:07:02 +1300 From: Nigel Cunningham Subject: Re: Help port swsusp to ppc. In-reply-to: <1074635683.795.43.camel@gaston> To: Benjamin Herrenschmidt Cc: Pavel Machek , Hugang , Linux Kernel Mailing List , debian-powerpc@lists.debian.org Reply-to: ncunningham@users.sourceforge.net Message-id: <1074636422.3949.32.camel@laptop-linux> MIME-version: 1.0 X-Mailer: Ximian Evolution 1.4.4-8mdk Content-type: multipart/signed; boundary="=-dXU/131A5nqrcZPDruLZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 References: <20040119105237.62a43f65@localhost> <1074483354.10595.5.camel@gaston> <1074489645.2111.8.camel@laptop-linux> <1074490463.10595.16.camel@gaston> <1074534964.2505.6.camel@laptop-linux> <1074549790.10595.55.camel@gaston> <20040120204407.GA9749@elf.ucw.cz> <1074635683.795.43.camel@gaston> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2625 Lines: 76 --=-dXU/131A5nqrcZPDruLZ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi. On Wed, 2004-01-21 at 10:54, Benjamin Herrenschmidt wrote: > > FYI, this is that "ugly C-generated assembly" we are talking about. I > > do not think it is so bad. >=20 > The x86 version has been cleaned up and isn't _that_ bad, though it > could definitely use some comments and I don't like the "Lxxx" labels, > I'd rather either use number with the "nb" or "nf" GAS constructs or > use real words labels. Looking at it though, I fail to see the need > to get it generated by gcc in the first place :) The 2.4 version works from C, even the SMP version I've prepared. Something in 2.6 is different, and I don't understand what/why (Pavel might be able to explain). If I understood that, I could get SMP support for 2.6 going too. > The PPC version that was proposed is horrible. I think he wanted help with cleaning it up. > > FYI, there are exactly 6 variables in "nosave" section. Two loop > > variables you can see in above code, one spinlock, number of pages to > > save, pointer to directory of pages to be copied, and its length. > >=20 > > I could probably move spinlock and length of pgdir out of there... >=20 > That's not too much, you could probably afford having a one page header > to the suspend image with those informations and the page copy loop > (provided by the suspended kernel so you don't have _any_ compatibility > issue and can even do it from the bootloader one day...) Well, we do have a header at the moment with that info, (but not containing the page copy loop :>) =20 > Looking at swsusp code in current 2.6, when do you do that pass ? On the > shutdown pass, you call devices_suspend(4); which is fine. But I don't se= e > where you call devices_suspend(X) on the resume path. IMHO, that should b= e Hmm. Perhaps it's just my version that does it? I couldn't find it either. Regards, Nigel --=20 My work on Software Suspend is graciously brought to you by LinuxFund.org. --=-dXU/131A5nqrcZPDruLZ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQBADaaGVfpQGcyBBWkRArcRAJ4vaogLtxKLqfHMJYXQfhqxw3pLAQCfX8to c2xUoC0HhzhZ13B8OOGFm0Q= =D0Gv -----END PGP SIGNATURE----- --=-dXU/131A5nqrcZPDruLZ-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/