freebsd-nq/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
acpi_battery.c
acpi_button.c
acpi_cmbat.c
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
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
acpi_if.m
acpi_isab.c
acpi_lid.c
acpi_package.c
acpi_pci_link.c
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
acpi_pcibvar.h
acpi_perf.c
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
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