Re: [RFC][PATCH 2/3] PM: More fine grained ACPI handling during suspend and hibernation (rev. 2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon 2007-08-27 01:54:16, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@xxxxxxx>
> 
> According to the ACPI specification (eg. ACPI 2.0c, sec. 7.3.1, 7.3.3,
> ACPI 3.0b, sec. 7.3.1, 7.3.3) the _GTS and _BFS global control methods should
> be executed, respectively, right before entering a sleep state (S1-S4) and right
> after leaving it, but we don't follow this reqirement.  Namely, in our
> implementation the nonboot CPUs are disabled after executing _GTS and enabled
> before executing _BFS, which doesn't seem to be correct.  [In fact, the ACPI
> specification requires that no physical I/O and interrupt servicing be performed
> after the sleep state has been left and before _BFS is executed as well as after
> executing _GTS and before the sleep state is entered, but we can't follow this
> requirement literally, since our AML interpreter needs to run with interrupts
> enabled and we need to carry out some operations with interrupts disabled before
> entering the sleep state and after leaving it.]  Moreover, acpi_enable() called
> after restoring the system memory state from a hibernation image should really
> be executed before enabling the nonboot CPUs, since functional ACPI may be
> needed for that.  All of this means that we need to handle ACPI in a more fine
> grained manner during suspend and hibernation.
> 
> For this reason we can introduce new global platform callbacks prepare_late()
> and finish_early() to be executed, respectively, between disabling the nonboot
> CPUs and entering a sleep state and between leaving the sleep state and enabling
> the nonboot CPUs.  For ACPI systems they can be used to execute the _GTS and
> _BFS global control methods, respectively.
> 
> It also seems to be a good idea to introduce new hibernation-related callback
> post_snapshot() to be executed after creating a hibernation image, instead of
> finish() (for now, both these callbacks are defined to point to the same
> function, but that will be changed in the future).
> 
> Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx>

Looks ok to me.
								Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux