acpi_system_save_state - save OS specific state and power down devices : sleep state we're entering.
This handles saving all context to memory, and possibly disk. First, we call to the device driver layer to save device state. Once we have that, we save whatevery processor and kernel state we need to memory. If we're entering S4, we then write the memory image to disk.
Only then it is safe for us to power down devices, since we may need the disks and upstream buses to write to.
Definition at line 219 of file system.c.