From: Pavel M. <pa...@su...> - 2004-03-26 10:06:37
|
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 <linux/mc146818rtc.h> > #include <linux/irq.h> > #include <asm/hw_irq.h> > - > -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?] |