hibernate_machdep.c depends on acpi
hi, the hibernate_machdep.c file depends on the acpi so it would be nice if we excluded this file if kernel config doesn't reference acpi. a simple fix that establishes the dependency is below. ok? Index: arch/i386/conf/files.i386 === RCS file: /home/cvs/src/sys/arch/i386/conf/files.i386,v retrieving revision 1.203 diff -u -p -r1.203 files.i386 --- arch/i386/conf/files.i386 23 May 2011 09:54:20 - 1.203 +++ arch/i386/conf/files.i386 17 Jun 2011 10:28:40 - @@ -24,7 +24,7 @@ file arch/i386/i386/est.c!small_kernel file arch/i386/i386/gdt.c file arch/i386/i386/in_cksum.s inet file arch/i386/i386/machdep.c -file arch/i386/i386/hibernate_machdep.c +file arch/i386/i386/hibernate_machdep.c acpi file arch/i386/i386/via.c file arch/i386/i386/amd64errata.c!small_kernel file arch/i386/i386/kgdb_machdep.c kgdb
Re: hibernate_machdep.c depends on acpi
On 2011/06/20 13:22, Mark Kettenis wrote: Date: Mon, 20 Jun 2011 11:04:24 +0200 From: Mike Belopuhov m...@crypt.org.ru hi, the hibernate_machdep.c file depends on the acpi so it would be nice if we excluded this file if kernel config doesn't reference acpi. a simple fix that establishes the dependency is below. ok? The hibernate code doesn't really depend on ACPI. Currently it is only called by the acpi code, but it should work just as well on systems without ACPI. Currently the hibernate code doesn't link if ACPI is not in kernel config.
Re: hibernate_machdep.c depends on acpi
Date: Mon, 20 Jun 2011 11:04:24 +0200 From: Mike Belopuhov m...@crypt.org.ru hi, the hibernate_machdep.c file depends on the acpi so it would be nice if we excluded this file if kernel config doesn't reference acpi. a simple fix that establishes the dependency is below. ok? The hibernate code doesn't really depend on ACPI. Currently it is only called by the acpi code, but it should work just as well on systems without ACPI. The code should be !small_kernel though; it seems it is currently wasting ramdisk space. Index: arch/i386/conf/files.i386 === RCS file: /home/cvs/src/sys/arch/i386/conf/files.i386,v retrieving revision 1.203 diff -u -p -r1.203 files.i386 --- arch/i386/conf/files.i386 23 May 2011 09:54:20 - 1.203 +++ arch/i386/conf/files.i386 17 Jun 2011 10:28:40 - @@ -24,7 +24,7 @@ filearch/i386/i386/est.c!small_kernel file arch/i386/i386/gdt.c file arch/i386/i386/in_cksum.s inet file arch/i386/i386/machdep.c -file arch/i386/i386/hibernate_machdep.c +file arch/i386/i386/hibernate_machdep.c acpi file arch/i386/i386/via.c file arch/i386/i386/amd64errata.c!small_kernel file arch/i386/i386/kgdb_machdep.c kgdb
Re: hibernate_machdep.c depends on acpi
Date: Mon, 20 Jun 2011 13:22:52 +0200 (CEST) From: Mark Kettenis mark.kette...@xs4all.nl Date: Mon, 20 Jun 2011 11:04:24 +0200 From: Mike Belopuhov m...@crypt.org.ru hi, the hibernate_machdep.c file depends on the acpi so it would be nice if we excluded this file if kernel config doesn't reference acpi. a simple fix that establishes the dependency is below. ok? The hibernate code doesn't really depend on ACPI. Currently it is only called by the acpi code, but it should work just as well on systems without ACPI. The code should be !small_kernel though; it seems it is currently wasting ramdisk space. Turns out it isn't actually wasting space, or at least not a lot of it, since the whole file is wrapped in #ifndef SMALL_KERNEL. We could still consider adding !small_kernel, since it will speed up building ramdisk kernels a bit.
Re: hibernate_machdep.c depends on acpi
On Mon, Jun 20, 2011 at 01:54:38PM +0200, Mark Kettenis wrote: Date: Mon, 20 Jun 2011 13:22:52 +0200 (CEST) From: Mark Kettenis mark.kette...@xs4all.nl Date: Mon, 20 Jun 2011 11:04:24 +0200 From: Mike Belopuhov m...@crypt.org.ru hi, the hibernate_machdep.c file depends on the acpi so it would be nice if we excluded this file if kernel config doesn't reference acpi. a simple fix that establishes the dependency is below. ok? The hibernate code doesn't really depend on ACPI. Currently it is only called by the acpi code, but it should work just as well on systems without ACPI. The code should be !small_kernel though; it seems it is currently wasting ramdisk space. Turns out it isn't actually wasting space, or at least not a lot of it, since the whole file is wrapped in #ifndef SMALL_KERNEL. We could still consider adding !small_kernel, since it will speed up building ramdisk kernels a bit. Agreed, !small_kernel in the config is much nicer than wrapping the whole file in an #ifndef. If no one else does this i'll whip up the diff later today. -0- -- The sooner all the animals are dead, the sooner we'll find their money. -- Ed Bluestone, The National Lampoon
Re: hibernate_machdep.c depends on acpi
Date: Mon, 20 Jun 2011 12:31:57 +0100 From: Stuart Henderson s...@spacehopper.org On 2011/06/20 13:22, Mark Kettenis wrote: Date: Mon, 20 Jun 2011 11:04:24 +0200 From: Mike Belopuhov m...@crypt.org.ru hi, the hibernate_machdep.c file depends on the acpi so it would be nice if we excluded this file if kernel config doesn't reference acpi. a simple fix that establishes the dependency is below. ok? The hibernate code doesn't really depend on ACPI. Currently it is only called by the acpi code, but it should work just as well on systems without ACPI. Currently the hibernate code doesn't link if ACPI is not in kernel config. Then that problem should be fixed. Meanwhile, I don't think it is a big issue if people can't compile their frankenkernels.
Re: hibernate_machdep.c depends on acpi
The code should be !small_kernel though; it seems it is currently wasting ramdisk space. Yes, it should be !small_kernel
Re: hibernate_machdep.c depends on acpi
On Mon, Jun 20, 2011 at 13:22 +0200, Mark Kettenis wrote: Date: Mon, 20 Jun 2011 11:04:24 +0200 From: Mike Belopuhov m...@crypt.org.ru hi, the hibernate_machdep.c file depends on the acpi so it would be nice if we excluded this file if kernel config doesn't reference acpi. a simple fix that establishes the dependency is below. ok? The hibernate code doesn't really depend on ACPI. Currently it is only called by the acpi code, but it should work just as well on systems without ACPI. it's an unfortunate consequence of putting an assembler chunk of the hibernate code into the acpi_wakecode.S.
Re: hibernate_machdep.c depends on acpi
On Mon, Jun 20, 2011 at 01:02:01PM +0100, Owain Ainsworth wrote: On Mon, Jun 20, 2011 at 01:54:38PM +0200, Mark Kettenis wrote: Date: Mon, 20 Jun 2011 13:22:52 +0200 (CEST) From: Mark Kettenis mark.kette...@xs4all.nl Date: Mon, 20 Jun 2011 11:04:24 +0200 From: Mike Belopuhov m...@crypt.org.ru hi, the hibernate_machdep.c file depends on the acpi so it would be nice if we excluded this file if kernel config doesn't reference acpi. a simple fix that establishes the dependency is below. ok? The hibernate code doesn't really depend on ACPI. Currently it is only called by the acpi code, but it should work just as well on systems without ACPI. The code should be !small_kernel though; it seems it is currently wasting ramdisk space. Turns out it isn't actually wasting space, or at least not a lot of it, since the whole file is wrapped in #ifndef SMALL_KERNEL. We could still consider adding !small_kernel, since it will speed up building ramdisk kernels a bit. Agreed, !small_kernel in the config is much nicer than wrapping the whole file in an #ifndef. If no one else does this i'll whip up the diff later today. -0- -- The sooner all the animals are dead, the sooner we'll find their money. -- Ed Bluestone, The National Lampoon I'm ok with the diff, mlarkin@ PS Nathanael Rensen nathanael at polymorpheus.com pointed this out to me a few months back, just never got around to it. -ml
Re: hibernate_machdep.c depends on acpi
On Mon, Jun 20, 2011 at 06:38:40PM +0200, Mike Belopuhov wrote: On Mon, Jun 20, 2011 at 13:22 +0200, Mark Kettenis wrote: Date: Mon, 20 Jun 2011 11:04:24 +0200 From: Mike Belopuhov m...@crypt.org.ru hi, the hibernate_machdep.c file depends on the acpi so it would be nice if we excluded this file if kernel config doesn't reference acpi. a simple fix that establishes the dependency is below. ok? The hibernate code doesn't really depend on ACPI. Currently it is only called by the acpi code, but it should work just as well on systems without ACPI. it's an unfortunate consequence of putting an assembler chunk of the hibernate code into the acpi_wakecode.S. We could split that up I suppose. There are two functions in there that are needed in hibernate, one to swap stacks and the other to bounce down to the S3 resume trampoline. -ml