On Saturday, 5 May 2007 12:16, Rafael J. Wysocki wrote:
> On Saturday, 5 May 2007 08:31, Andrew Morton wrote:
> > On Fri, 4 May 2007 11:32:31 +0200 "Rafael J. Wysocki" <[EMAIL PROTECTED]> 
> > wrote:
> > 
> > > Separate the hibernation (aka suspend to disk code) from the other 
> > > suspend code.
> > > In particular:
> > >  * Remove the definitions related to hibernation from include/linux/pm.h
> > >  * Introduce struct hibernation_ops and a new hibernate() function to 
> > > hibernate
> > >    the system, defined in include/linux/suspend.h
> > >  * Separate suspend code in kernel/power/main.c from hibernation-related 
> > > code
> > >    in kernel/power/disk.c and kernel/power/user.c (with the help of
> > >    hibernation_ops)
> > >  * Switch ACPI (the only user of pm_ops.pm_disk_mode) to hibernation_ops
> > 
> > This causes the long-suffering Vaio to fail to power off during suspend
> > to disk.  It says "Please power me down manually".
> 
> Hmm, looks like a failure of acpi_hibernation_enter().  Can you please put a
> printk() in there, after local_irq_restore()?

Anyway, we should power off the system rather than halt it if hibernation_ops
is not set.

---
From: Rafael J. Wysocki <[EMAIL PROTECTED]>

Power off the system instead of halting it if the 'platform' mode of hibernation
has been requested, but hibernation_ops is not set.

Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
---
 kernel/power/disk.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6.21/kernel/power/disk.c
===================================================================
--- linux-2.6.21.orig/kernel/power/disk.c       2007-05-05 12:24:33.000000000 
+0200
+++ linux-2.6.21/kernel/power/disk.c    2007-05-05 13:51:45.000000000 +0200
@@ -99,9 +99,6 @@ static void power_down(void)
        case HIBERNATION_TEST:
        case HIBERNATION_TESTPROC:
                break;
-       case HIBERNATION_SHUTDOWN:
-               kernel_power_off();
-               break;
        case HIBERNATION_REBOOT:
                kernel_restart(NULL);
                break;
@@ -111,6 +108,9 @@ static void power_down(void)
                        hibernation_ops->enter();
                        break;
                }
+       case HIBERNATION_SHUTDOWN:
+               kernel_power_off();
+               break;
        }
        kernel_halt();
        /*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to