From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [PATCH] ACPI poweroff fixes for 2.4.26-pre2 Date: Fri, 26 Mar 2004 11:06:17 +0100 Sender: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Message-ID: <20040326100617.GC388@elf.ucw.cz> References: <1079279490.10225.10.camel@darkstar> <20040315210729.GA19306@alpha.home.local> <1079389434.3695.2.camel@darkstar> <20040315231927.GA19829@alpha.home.local> <20040322105946.GC1505@openzaurus.ucw.cz> <1080253327.3755.20.camel@darkstar> <20040325222934.GF2179@elf.ucw.cz> <1080255058.4187.1.camel@darkstar> <20040325230037.GK2179@elf.ucw.cz> <20040326055547.GA26599@alpha.home.local> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20040326055547.GA26599-HkMpAodKYdnXX8ko2wsARw@public.gmane.org> Errors-To: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Willy Tarreau Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-acpi@vger.kernel.org Hi! On P=E1 26-03-04 06:55:47, Willy Tarreau wrote: > On Fri, Mar 26, 2004 at 12:00:37AM +0100, Pavel Machek wrote: > > > so acpi_system_save_state(state) does do nothing at all ? > > > or does return nothing at all ? > >=20 > > IIRC there was patch that made acpi_system_save_state() do nothing at > > all if !CONFIG_ACPI_SLEEP. I'm arguing thats very wrong. >=20 > I 100% agree that it's dirty to call a fake function instead of not > calling it at all. Indeed, one of my proposed patches removed the > dependency on CONFIG_ACPI_SLEEP through a simple replacement of > acpi_system_save_state() with two calls to pm_send_all() which does > not depend on CONFIG_ACPI_SLEEP. I believe it was cleaner, but it's > not what is included in BK right now... Here it is for reference. Yes, this looks good and needed. Pavel > --- linux-2.4.26-pre3-acpi/drivers/acpi/system.c Mon Mar 15 21:54:55 20= 04 > +++ linux-2.4.26-pre3-acpi-pwoff/drivers/acpi/system.c Mon Mar 15 21:57= :32 2004 > @@ -46,13 +46,6 @@ > #include > #include > #include > - > -acpi_status acpi_system_save_state(u32); > -#else > -static inline acpi_status acpi_system_save_state(u32 state) > -{ > - return AE_OK; > -} > #endif /* !CONFIG_ACPI_SLEEP */ > =20 > #define _COMPONENT ACPI_SYSTEM_COMPONENT > @@ -102,7 +95,8 @@ > BUG(); > /* Some SMP machines only can poweroff in boot CPU */ > set_cpus_allowed(current, 1UL << cpu_logical_map(0)); > - acpi_system_save_state(ACPI_STATE_S5); > + pm_send_all(PM_SAVE_STATE, (void *)3); > + pm_send_all(PM_SUSPEND, (void *)3); > acpi_enter_sleep_state_prep(ACPI_STATE_S5); > ACPI_DISABLE_IRQS(); > acpi_enter_sleep_state(ACPI_STATE_S5); >=20 >=20 --=20 When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click