<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/power/suspend.c, branch v3.4.94</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/power/suspend.c?h=v3.4.94</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/power/suspend.c?h=v3.4.94'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-08-09T15:31:29Z</updated>
<entry>
<title>ftrace: Disable function tracing during suspend/resume and hibernation, again</title>
<updated>2012-08-09T15:31:29Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2012-06-16T13:30:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d3dd392851e014c90ce9e26d03a93188840a5a0b'/>
<id>urn:sha1:d3dd392851e014c90ce9e26d03a93188840a5a0b</id>
<content type='text'>
commit 443772d408a25af62498793f6f805ce3c559309a upstream.

If function tracing is enabled for some of the low-level suspend/resume
functions, it leads to triple fault during resume from suspend, ultimately
ending up in a reboot instead of a resume (or a total refusal to come out
of suspended state, on some machines).

This issue was explained in more detail in commit f42ac38c59e0a03d (ftrace:
disable tracing for suspend to ram). However, the changes made by that commit
got reverted by commit cbe2f5a6e84eebb (tracing: allow tracing of
suspend/resume &amp; hibernation code again). So, unfortunately since things are
not yet robust enough to allow tracing of low-level suspend/resume functions,
suspend/resume is still broken when ftrace is enabled.

So fix this by disabling function tracing during suspend/resume &amp; hibernation.

Signed-off-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Sleep: Move disabling of usermode helpers to the freezer</title>
<updated>2012-03-28T21:30:21Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-03-28T21:30:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1e73203cd1157a03facc41ffb54050f5b28e55bd'/>
<id>urn:sha1:1e73203cd1157a03facc41ffb54050f5b28e55bd</id>
<content type='text'>
The core suspend/hibernation code calls usermodehelper_disable() to
avoid race conditions between the freezer and the starting of
usermode helpers and each code path has to do that on its own.
However, it is always called right before freeze_processes()
and usermodehelper_enable() is always called right after
thaw_processes().  For this reason, to avoid code duplication and
to make the connection between usermodehelper_disable() and the
freezer more visible, make freeze_processes() call it and remove the
direct usermodehelper_disable() and usermodehelper_enable() calls
from all suspend/hibernation code paths.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>PM / Sleep: Drop suspend_stats_update()</title>
<updated>2012-02-17T22:36:23Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-02-13T15:29:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bc25cf508942c56810d4fb623ef27b56ccef7783'/>
<id>urn:sha1:bc25cf508942c56810d4fb623ef27b56ccef7783</id>
<content type='text'>
Since suspend_stats_update() is only called from pm_suspend(),
move its code directly into that function and remove the static
inline definition from include/linux/suspend.h.  Clean_up
pm_suspend() in the process.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: Make enter_state() in kernel/power/suspend.c static</title>
<updated>2012-02-17T22:36:10Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-02-13T15:29:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=93e1ee43a72b11e1b50aab87046c131a836a4456'/>
<id>urn:sha1:93e1ee43a72b11e1b50aab87046c131a836a4456</id>
<content type='text'>
The enter_state() function in kernel/power/suspend.c should be
static and state_store() in kernel/power/suspend.c should call
pm_suspend() instead of it, so make that happen (which also reduces
code duplication related to suspend statistics).

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: Unify kerneldoc comments in kernel/power/suspend.c</title>
<updated>2012-02-17T22:36:03Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-02-13T15:29:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=55ae451918ec62e553f11b6118fec157f90c31c3'/>
<id>urn:sha1:55ae451918ec62e553f11b6118fec157f90c31c3</id>
<content type='text'>
The kerneldoc comments in kernel/power/suspend.c are not formatted
in the same way and the quality of some of them is questionable.
Unify the formatting and improve the contents.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>PM / Suspend: Avoid code duplication in suspend statistics update</title>
<updated>2012-02-09T22:55:43Z</updated>
<author>
<name>Marcos Paulo de Souza</name>
<email>marcos.mage@gmail.com</email>
</author>
<published>2012-02-04T21:26:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8916e3702ec422b57cc549fbae3986106292100f'/>
<id>urn:sha1:8916e3702ec422b57cc549fbae3986106292100f</id>
<content type='text'>
The code
       if (error) {
               suspend_stats.fail++;
               dpm_save_failed_errno(error);
       } else
               suspend_stats.success++;

Appears in the kernel/power/main.c and kernel/power/suspend.c.

This patch just creates a new function to avoid duplicated code.

Suggested-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Marcos Paulo de Souza &lt;marcos.mage@gmail.com&gt;
Acked-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: Introduce "late suspend" and "early resume" of devices</title>
<updated>2012-01-29T19:38:29Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2012-01-29T19:38:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cf579dfb82550e34de7ccf3ef090d8b834ccd3a9'/>
<id>urn:sha1:cf579dfb82550e34de7ccf3ef090d8b834ccd3a9</id>
<content type='text'>
The current device suspend/resume phases during system-wide power
transitions appear to be insufficient for some platforms that want
to use the same callback routines for saving device states and
related operations during runtime suspend/resume as well as during
system suspend/resume.  In principle, they could point their
.suspend_noirq() and .resume_noirq() to the same callback routines
as their .runtime_suspend() and .runtime_resume(), respectively,
but at least some of them require device interrupts to be enabled
while the code in those routines is running.

It also makes sense to have device suspend-resume callbacks that will
be executed with runtime PM disabled and with device interrupts
enabled in case someone needs to run some special code in that
context during system-wide power transitions.

Apart from this, .suspend_noirq() and .resume_noirq() were introduced
as a workaround for drivers using shared interrupts and failing to
prevent their interrupt handlers from accessing suspended hardware.
It appears to be better not to use them for other porposes, or we may
have to deal with some serious confusion (which seems to be happening
already).

For the above reasons, introduce new device suspend/resume phases,
"late suspend" and "early resume" (and analogously for hibernation)
whose callback will be executed with runtime PM disabled and with
device interrupts enabled and whose callback pointers generally may
point to runtime suspend/resume routines.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Reviewed-by: Kevin Hilman &lt;khilman@ti.com&gt;
</content>
</entry>
<entry>
<title>PM / Sleep: Replace mutex_[un]lock(&amp;pm_mutex) with [un]lock_system_sleep()</title>
<updated>2011-12-08T22:22:29Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2011-12-07T21:29:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bcda53faf5814c0c6025a0bd47108adfcbe9f199'/>
<id>urn:sha1:bcda53faf5814c0c6025a0bd47108adfcbe9f199</id>
<content type='text'>
Using [un]lock_system_sleep() is safer than directly using mutex_[un]lock()
on 'pm_mutex', since the latter could lead to freezing failures. Hence convert
all the present users of mutex_[un]lock(&amp;pm_mutex) to use these safe APIs
instead.

Suggested-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Reviewed-by: Simon Horman &lt;horms@verge.net.au&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>freezer: clean up freeze_processes() failure path</title>
<updated>2011-11-21T20:32:24Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-11-21T20:32:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=03afed8bc296fa70186ba832c1126228bb992465'/>
<id>urn:sha1:03afed8bc296fa70186ba832c1126228bb992465</id>
<content type='text'>
freeze_processes() failure path is rather messy.  Freezing is canceled
for workqueues and tasks which aren't frozen yet but frozen tasks are
left alone and should be thawed by the caller and of course some
callers (xen and kexec) didn't do it.

This patch updates __thaw_task() to handle cancelation correctly and
makes freeze_processes() and freeze_kernel_threads() call
thaw_processes() on failure instead so that the system is fully thawed
on failure.  Unnecessary [suspend_]thaw_processes() calls are removed
from kernel/power/hibernate.c, suspend.c and user.c.

While at it, restructure error checking if clause in suspend_prepare()
to be less weird.

-v2: Srivatsa spotted missing removal of suspend_thaw_processes() in
     suspend_prepare() and error in commit message.  Updated.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>kernel: Fix files explicitly needing EXPORT_SYMBOL infrastructure</title>
<updated>2011-10-31T23:30:05Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-26T20:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6e5fdeedca610df600aabc393c4b1f44b128fe49'/>
<id>urn:sha1:6e5fdeedca610df600aabc393c4b1f44b128fe49</id>
<content type='text'>
These files were getting &lt;linux/module.h&gt; via an implicit non-obvious
path, but we want to crush those out of existence since they cost
time during compiles of processing thousands of lines of headers
for no reason.  Give them the lightweight header that just contains
the EXPORT_SYMBOL infrastructure.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
</feed>
