HomeFreeBSD

acpi: do not run resume/backout code when entering S0/S5 states
rS191627Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

acpi: do not run resume/backout code when entering S0/S5 states

This change adds (possibly redundant) early check for invalid
state input parameter (including S0). Handling of S5 request
is reduced to simply calling shutdown_nice(). As a result
control flow of acpi_EnterSleepState is somewhat simplified
and resume/backout half of the function is not executed
for S5 (soft poweroff) request and invalid state requests.

Note: it seems that shutdown_nice may act as nop when initproc
is already initialized (to grab pid of 1), but init process is in
"pre-natal" state.

Tested by: Fabian Keil <fk@fabiankeil.de>
Reviewed by: njl, jkim
Approved by: rpaulo

Details

Provenance
avgAuthored on
Parents
rS191626: Use the acquired reference to the vmspace instead of direct dereferencing
Branches
Unknown
Tags
Unknown

Event Timeline