freebsd-dev/sys/dev/acpica
Andriy Gapon 85f95fffd7 hook userland threads suspend + resume into acpi suspend code
Also, split power_suspend into power_suspend and power_suspend_early.

power_suspend_early is called before the userland is frozen.
power_suspend is called after the userland is frozen.

Currently only VT switching is hooked to power_suspend_early.
This is needed because switching away from X server requires its
cooperation, so obviously X server must not be frozen when that happens.

Freezing userland during ACPI suspend is useful because not all drivers
correctly handle suspension concurrent with other activity.  This is
especially applicable to drivers ported from other operating systems
that suspend all software activity between placing drivers and hardware
into suspended state.
In particular drm2/radeon (radeonkms) depends on the described
procedure.  The driver does not have any internal synchronization
between suspension activities and processing of userland requests.

Many thanks to kib for the code that allows to freeze and thaw all
userland threads.

Note that ideally we also need to park / inhibit (non-special) kernel
threads as well to ensure that they do not call into drivers.

MFC after:	17 days
2015-01-27 17:33:18 +00:00
..
Osd Merge ACPICA 20140926. 2014-10-02 19:11:18 +00:00
acpi_acad.c Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
acpi_battery.c Prevent a division by zero with some broken batteries 2011-11-26 13:43:50 +00:00
acpi_button.c Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
acpi_cmbat.c Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
acpi_cpu.c When disabling C3+ CPU states due to the CPU_QUIRK_NO_C3 quirk, don't 2015-01-18 12:45:26 +00:00
acpi_dock.c Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
acpi_ec.c Simplify retry loops. No functional change. 2015-01-23 18:55:04 +00:00
acpi_hpet.c Set the caching mode for the usermode mapping of the HPET registers 2014-10-25 21:01:50 +00:00
acpi_hpet.h Always check current HPET counter value after comparator programming to 2011-08-16 21:51:29 +00:00
acpi_if.m
acpi_isab.c - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
acpi_lid.c Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
acpi_package.c
acpi_pci_link.c - Some BIOSes use an Extended IRQ resource descriptor in _PRS for a link 2013-04-22 15:51:06 +00:00
acpi_pci.c Add a bus method to fetch the VM domain for the given device/bus. 2014-10-09 05:33:25 +00:00
acpi_pcib_acpi.c Add support for managing PCI bus numbers. As with BARs and PCI-PCI bridge 2014-02-12 04:30:37 +00:00
acpi_pcib_pci.c Add support for managing PCI bus numbers. As with BARs and PCI-PCI bridge 2014-02-12 04:30:37 +00:00
acpi_pcib.c Don't perform the acpi_DeviceIsPresent() check for PCI-PCI bridges. If 2013-07-03 17:26:05 +00:00
acpi_pcibvar.h
acpi_perf.c Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
acpi_powerres.c Remove not needed initialisation code. 2014-06-26 10:48:01 +00:00
acpi_quirk.c
acpi_quirks
acpi_resource.c Turns out name was used here when ACPI_DEBUG was defined, so refine my 2014-03-31 19:37:39 +00:00
acpi_smbat.c Remove instances of variables that were set, but never used. gcc 4.9 2014-03-30 23:43:36 +00:00
acpi_smbus.h
acpi_thermal.c acpi_thermal: Warn about insane _TMP temperature only once 2013-08-30 19:21:12 +00:00
acpi_throttle.c Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays 2013-01-30 18:01:20 +00:00
acpi_timer.c xen: add ACPI bus to xen_nexus when running as Dom0 2014-08-04 09:05:28 +00:00
acpi_video.c Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this 2013-11-30 22:17:27 +00:00
acpi.c hook userland threads suspend + resume into acpi suspend code 2015-01-27 17:33:18 +00:00
acpiio.h
acpivar.h Add a bus method to fetch the VM domain for the given device/bus. 2014-10-09 05:33:25 +00:00