<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/power, branch v3.0.87</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/power?h=v3.0.87</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/power?h=v3.0.87'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-08-09T15:27:35Z</updated>
<entry>
<title>ftrace: Disable function tracing during suspend/resume and hibernation, again</title>
<updated>2012-08-09T15:27:35Z</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=31b1c0850709c77ece1690a8fbc043829717d14c'/>
<id>urn:sha1:31b1c0850709c77ece1690a8fbc043829717d14c</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 / Hibernate: Enable usermodehelpers in hibernate() error path</title>
<updated>2012-04-02T16:27:18Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2012-02-17T22:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=65554407a7dbc5ebcc42d53b6a1dfcd18ca7685d'/>
<id>urn:sha1:65554407a7dbc5ebcc42d53b6a1dfcd18ca7685d</id>
<content type='text'>
commit 05b4877f6a4f1ba4952d1222213d262bf8c132b7 upstream.

If create_basic_memory_bitmaps() fails, usermodehelpers are not re-enabled
before returning. Fix this. And while at it, reword the goto labels so that
they look more meaningful.

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 / Suspend: Off by one in pm_suspend()</title>
<updated>2011-11-11T17:37:17Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2011-09-21T18:55:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f450df800450e9c7ec8c53bdb72d6c4ef5f17d4e'/>
<id>urn:sha1:f450df800450e9c7ec8c53bdb72d6c4ef5f17d4e</id>
<content type='text'>
commit 528f7ce6e439edeac38f6b3f8561f1be129b5e91 upstream.

In enter_state() we use "state" as an offset for the pm_states[]
array.  The pm_states[] array only has PM_SUSPEND_MAX elements so
this test is off by one.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>PM / Hibernate: Fix free_unnecessary_pages()</title>
<updated>2011-07-06T18:15:23Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-07-06T18:15:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4d4cf23cdde2f8f9324f5684a7f349e182039529'/>
<id>urn:sha1:4d4cf23cdde2f8f9324f5684a7f349e182039529</id>
<content type='text'>
There is a bug in free_unnecessary_pages() that causes it to
attempt to free too many pages in some cases, which triggers the
BUG_ON() in memory_bm_clear_bit() for copy_bm.  Namely, if
count_data_pages() is initially greater than alloc_normal, we get
to_free_normal equal to 0 and "save" greater from 0.  In that case,
if the sum of "save" and count_highmem_pages() is greater than
alloc_highmem, we subtract a positive number from to_free_normal.
Hence, since to_free_normal was 0 before the subtraction and is
an unsigned int, the result is converted to a huge positive number
that is used as the number of pages to free.

Fix this bug by checking if to_free_normal is actually greater
than or equal to the number we're going to subtract from it.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reported-and-tested-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>PM: Free memory bitmaps if opening /dev/snapshot fails</title>
<updated>2011-06-21T21:20:06Z</updated>
<author>
<name>Michal Kubecek</name>
<email>mkubecek@suse.cz</email>
</author>
<published>2011-06-18T18:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8440f4b19494467883f8541b7aa28c7bbf6ac92b'/>
<id>urn:sha1:8440f4b19494467883f8541b7aa28c7bbf6ac92b</id>
<content type='text'>
When opening /dev/snapshot device, snapshot_open() creates memory
bitmaps which are freed in snapshot_release(). But if any of the
callbacks called by pm_notifier_call_chain() returns NOTIFY_BAD, open()
fails, snapshot_release() is never called and bitmaps are not freed.
Next attempt to open /dev/snapshot then triggers BUG_ON() check in
create_basic_memory_bitmaps(). This happens e.g. when vmwatchdog module
is active on s390x.

Signed-off-by: Michal Kubecek &lt;mkubecek@suse.cz&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>PM / Hibernate: Update kerneldoc comments in hibernate.c</title>
<updated>2011-05-24T21:36:06Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-05-24T21:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f42a9813fbf930fea3bdd0524dcb43c7feb0c977'/>
<id>urn:sha1:f42a9813fbf930fea3bdd0524dcb43c7feb0c977</id>
<content type='text'>
Some of the kerneldoc comments in kernel/power/hibernate.c are
outdated and some of them don't adhere to the kernel's standards.
Update them and make them look in a consistent way.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
</content>
</entry>
<entry>
<title>PM / Hibernate: Remove arch_prepare_suspend()</title>
<updated>2011-05-24T21:35:55Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-05-24T21:35:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=354258011e8e86961f7a72ad154ca8caf0c4c6f7'/>
<id>urn:sha1:354258011e8e86961f7a72ad154ca8caf0c4c6f7</id>
<content type='text'>
All architectures supporting hibernation define
arch_prepare_suspend() as an empty function, so remove it.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Hibernate: Update some comments in core hibernate code</title>
<updated>2011-05-23T22:21:26Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-05-23T22:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4e2d9491a78929badcf774869b458486acb96365'/>
<id>urn:sha1:4e2d9491a78929badcf774869b458486acb96365</id>
<content type='text'>
Some comments in the core hibernate code are outdated, some aren't
necessary any more and at least one of them is plain wrong.  Remove
those comments or update them.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM: Allow drivers to allocate memory from .prepare() callbacks safely</title>
<updated>2011-05-17T21:26:00Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-05-17T21:26:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=91e7c75ba93c48a82670d630b9daac92ff70095d'/>
<id>urn:sha1:91e7c75ba93c48a82670d630b9daac92ff70095d</id>
<content type='text'>
If device drivers allocate substantial amounts of memory (above 1 MB)
in their hibernate .freeze() callbacks (or in their legacy suspend
callbcks during hibernation), the subsequent creation of hibernate
image may fail due to the lack of memory.  This is the case, because
the drivers' .freeze() callbacks are executed after the hibernate
memory preallocation has been carried out and the preallocated amount
of memory may be too small to cover the new driver allocations.
Unfortunately, the drivers' .prepare() callbacks also are executed
after the hibernate memory preallocation has completed, so they are
not suitable for allocating additional memory either.  Thus the only
way a driver can safely allocate memory during hibernation is to use
a hibernate/suspend notifier.  However, the notifiers are called
before the freezing of user space and the drivers wanting to use them
for allocating additional memory may not know how much memory needs
to be allocated at that point.

To let device drivers overcome this difficulty rework the hibernation
sequence so that the memory preallocation is carried out after the
drivers' .prepare() callbacks have been executed, so that the
.prepare() callbacks can be used for allocating additional memory
to be used by the drivers' .freeze() callbacks.  Update documentation
to match the new behavior of the code.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM: Remove CONFIG_PM_VERBOSE</title>
<updated>2011-05-17T21:25:10Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2011-05-17T21:25:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c650da23d59d2c82307380414606774c6d49b8bd'/>
<id>urn:sha1:c650da23d59d2c82307380414606774c6d49b8bd</id>
<content type='text'>
Now that we have CONFIG_DYNAMIC_DEBUG there is no need for yet
another flag causing dev_dbg() and pr_debug() statements in the
core PM code to produce output.  Moreover, CONFIG_PM_VERBOSE
causes so much output to be generated that it's not really useful
and almost no one sets it.

References: https://bugzilla.kernel.org/show_bug.cgi?id=23182
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
</feed>
