Re: Fix up power managment in 2.6

Bill Davidsen
2003-09-03T20:15:21Z

On Tue, 2 Sep 2003, Patrick Mochel wrote:

>
> > @@ -65,9 +65,7 @@
> >
> > #include "power.h"
> >
> > -extern long sys_sync(void);
> > -
> > -unsigned char software_suspend_enabled = 0;
> > +unsigned char software_suspend_enabled = 1;
> >
> > #define __ADDRESS(x) ((unsigned long) phys_to_virt(x))
> >
> > ...by this you enable suspend even before system is booted. That's bad
> > idea. It could hurt in the past (when we had sysrq-D so swsusp), and
> > it may hurt again in future when battery goes low during boot.
>
> Does it or does it not cause a problem? Look at the old software_suspend()
> function - The handling of this flag was weird and non-standard. This is
> cleaner.

I don't want to get in the middle of this, but having a laptop decide
that it doesn't have enough battery to finish a boot is something which
happens now and again. If this change could cause data corruption where
the old code didn't, perhaps we could stand the overhead of moving the
enable to the end of the boot, or wherever would be safe.

--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.