freebsd-skq/sys/i386
Warner Losh d708737568 APM was calling the suspend process from a timeout. This meant that
other timeouts could not happen while suspending, including timeouts
for things like msleep.  This caused the system to hang on suspend
when the cbb was enabled, since its suspend path powered down the
socket which used a timeout to wait for it to be done.

APM now creates a thread when it is enabled, and deletes the thread
when it is disabled.  This thread takes the place of the timeout by
doing its polling every ~.9s.  When the thread is disabled, it will
wakeup early, otherwise it times out and polls the varius things the
old timeout polled (APM events, suspend delays, etc).

This makes my Sony VAIO 505TS suspend/resume correctly when APM is
enabled (ACPI is black listed on my 505TS).

This will likely fix other problems with the suspend path where
drivers would sleep with msleep and/or do other timeouts.  Maybe
there's some special case code that would use DELAY while suspending
and msleep otherwise that can be revisited and removed.

This was also tested by glebius@, who pointed out that in the patch I
sent him, I'd forgotten apm_saver.c

MFC After: 3 weeks
2006-05-25 23:06:38 +00:00
..
acpica If the XSDT address in the RSDP for an ACPI 2.0 machine is NULL, then fall 2006-03-27 15:59:48 +00:00
bios APM was calling the suspend process from a timeout. This meant that 2006-05-25 23:06:38 +00:00
compile
conf - Add C-bus and ISA front-ends for le(4) so it can actually replace 2006-05-17 21:25:23 +00:00
cpufreq Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
i386 Since DELAY() was moved, most <machine/clock.h> #includes have been 2006-05-16 14:37:58 +00:00
ibcs2 Regenerate. 2006-02-06 22:15:00 +00:00
include Move clock_lock prototype into <machine/clock.h>, where it is more 2006-05-19 18:53:50 +00:00
isa Send the pcvt(4) driver off to retirement. 2006-05-17 09:33:15 +00:00
linux regen (linux rt_sigpending) 2006-05-10 18:19:51 +00:00
pci - Make pcib_devclass private to sys/dev/pci/pci_pci.c and change all the 2006-01-06 19:22:19 +00:00
svr4 Use svr4_si_{addr,code,errno,signo,trap} in preference to si_{...}. 2005-10-19 14:59:54 +00:00
xbox Committed the xbox syscons(8)-able console driver. 2006-03-03 14:52:57 +00:00
Makefile