<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/power/disk.c, branch v2.6.30</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.30</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.30'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-05-24T19:15:07Z</updated>
<entry>
<title>PM: Do not hold dpm_list_mtx while disabling/enabling nonboot CPUs</title>
<updated>2009-05-24T19:15:07Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2009-05-24T19:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=32bdfac5462d777f35b00838893c4f87baf23efe'/>
<id>urn:sha1:32bdfac5462d777f35b00838893c4f87baf23efe</id>
<content type='text'>
We shouldn't hold dpm_list_mtx while executing
[disable|enable]_nonboot_cpus(), because theoretically this may lead
to a deadlock as shown by the following example (provided by Johannes
Berg):

CPU 3       CPU 2                     CPU 1
                                      suspend/hibernate
            something:
            rtnl_lock()               device_pm_lock()
                                       -&gt; mutex_lock(&amp;dpm_list_mtx)

            mutex_lock(&amp;dpm_list_mtx)

linkwatch_work
 -&gt; rtnl_lock()
                                      disable_nonboot_cpus()
                                       -&gt; flush CPU 3 workqueue

Fortunately, device drivers are supposed to stop any activities that
might lead to the registration of new device objects way before
disable_nonboot_cpus() is called, so it shouldn't be necessary to
hold dpm_list_mtx over the entire late part of device suspend and
early part of device resume.

Thus, during the late suspend and the early resume of devices acquire
dpm_list_mtx only when dpm_list is going to be traversed and release
it right after that.

This patch is reported to fix the regressions tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=13245.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Miles Lane &lt;miles.lane@gmail.com&gt;
Tested-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
</content>
</entry>
<entry>
<title>PM: check sysdev_suspend(PMSG_FREEZE) return value</title>
<updated>2009-05-15T21:30:50Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bjorn.helgaas@hp.com</email>
</author>
<published>2009-05-15T21:30:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4484079d517c2b6521621be0b1ea246ccc55c7d7'/>
<id>urn:sha1:4484079d517c2b6521621be0b1ea246ccc55c7d7</id>
<content type='text'>
Check the return value of sysdev_suspend().  I think this was a typo.
Without this change, the following "if" check is always false.
I also changed the error message so it's distinguishable from the
similar message a few lines above.

Signed-off-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM/Hibernate: Fix waiting for image device to appear on resume</title>
<updated>2009-04-24T22:31:30Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2009-04-24T22:16:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c8454f56623505a99463405fd7d5664adfbb094'/>
<id>urn:sha1:0c8454f56623505a99463405fd7d5664adfbb094</id>
<content type='text'>
Commit c751085943362143f84346d274e0011419c84202 ("PM/Hibernate: Wait for
SCSI devices scan to complete during resume") added a call to
scsi_complete_async_scans() to software_resume(), so that it waited for
the SCSI scanning to complete, but the call was added at a wrong place.

Namely, it should have been added after wait_for_device_probe(), which
is called only if the image partition hasn't been specified yet.  Also,
it's reasonable to check if the image partition is present and only wait
for the device probing and SCSI scanning to complete if it is not the
case.

Additionally, since noresume is checked right at the beginning of
software_resume() and the function returns immediately if it's set, it
doesn't make sense to check it once again later.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>PM/Hibernate: Wait for SCSI devices scan to complete during resume</title>
<updated>2009-04-13T18:37:07Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2009-04-12T18:06:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c751085943362143f84346d274e0011419c84202'/>
<id>urn:sha1:c751085943362143f84346d274e0011419c84202</id>
<content type='text'>
There is a race between resume from hibernation and the asynchronous
scanning of SCSI devices and to prevent it from happening we need to
call scsi_complete_async_scans() during resume from hibernation.

In addition, if the resume from hibernation is userland-driven, it's
better to wait for all device probes in the kernel to complete before
attempting to open the resume device.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial</title>
<updated>2009-04-03T22:24:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-04-03T22:24:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=811158b147a503fbdf9773224004ffd32002d1fe'/>
<id>urn:sha1:811158b147a503fbdf9773224004ffd32002d1fe</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits)
  trivial: Update my email address
  trivial: NULL noise: drivers/mtd/tests/mtd_*test.c
  trivial: NULL noise: drivers/media/dvb/frontends/drx397xD_fw.h
  trivial: Fix misspelling of "Celsius".
  trivial: remove unused variable 'path' in alloc_file()
  trivial: fix a pdlfush -&gt; pdflush typo in comment
  trivial: jbd header comment typo fix for JBD_PARANOID_IOFAIL
  trivial: wusb: Storage class should be before const qualifier
  trivial: drivers/char/bsr.c: Storage class should be before const qualifier
  trivial: h8300: Storage class should be before const qualifier
  trivial: fix where cgroup documentation is not correctly referred to
  trivial: Give the right path in Documentation example
  trivial: MTD: remove EOL from MODULE_DESCRIPTION
  trivial: Fix typo in bio_split()'s documentation
  trivial: PWM: fix of #endif comment
  trivial: fix typos/grammar errors in Kconfig texts
  trivial: Fix misspelling of firmware
  trivial: cgroups: documentation typo and spelling corrections
  trivial: Update contact info for Jochen Hein
  trivial: fix typo "resgister" -&gt; "register"
  ...
</content>
</entry>
<entry>
<title>pm: rework includes, remove arch ifdefs</title>
<updated>2009-04-01T15:59:16Z</updated>
<author>
<name>Magnus Damm</name>
<email>damm@igel.co.jp</email>
</author>
<published>2009-03-31T22:23:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a8af78982ff4c0b3731527b0217d286a343a3089'/>
<id>urn:sha1:a8af78982ff4c0b3731527b0217d286a343a3089</id>
<content type='text'>
Make the following header file changes:

 - remove arch ifdefs and asm/suspend.h from linux/suspend.h
 - add asm/suspend.h to disk.c (for arch_prepare_suspend())
 - add linux/io.h to swsusp.c (for ioremap())
 - x86 32/64 bit compile fixes

Signed-off-by: Magnus Damm &lt;damm@igel.co.jp&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>PM: Change hibernation code ordering</title>
<updated>2009-03-30T19:46:54Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2009-03-16T21:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4aecd6718939eb3c4145b248369b65f7483a8a02'/>
<id>urn:sha1:4aecd6718939eb3c4145b248369b65f7483a8a02</id>
<content type='text'>
Change the ordering of the hibernation core code so that the platform
"prepare" callbacks are executed and the nonboot CPUs are disabled
after calling device drivers' "late suspend" methods.

This change (along with the previous analogous change of the suspend
core code) will allow us to rework the PCI PM core so that the power
state of devices is changed in the "late" phase of suspend (and
analogously in the "early" phase of resume), which in turn will allow
us to avoid the race condition where a device using shared interrupts
is put into a low power state with interrupts enabled and then an
interrupt (for another device) comes in and confuses its driver.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>PM: Rework handling of interrupts during suspend-resume</title>
<updated>2009-03-30T19:46:54Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2009-03-16T21:34:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2ed8d2b3a81bdbb0418301628ccdb008ac9f40b7'/>
<id>urn:sha1:2ed8d2b3a81bdbb0418301628ccdb008ac9f40b7</id>
<content type='text'>
Use the functions introduced in by the previous patch,
suspend_device_irqs(), resume_device_irqs() and check_wakeup_irqs(),
to rework the handling of interrupts during suspend (hibernation) and
resume.  Namely, interrupts will only be disabled on the CPU right
before suspending sysdevs, while device drivers will be prevented
from receiving interrupts, with the help of the new helper function,
before their "late" suspend callbacks run (and analogously during
resume).

In addition, since the device interrups are now disabled before the
CPU has turned all interrupts off and the CPU will ACK the interrupts
setting the IRQ_PENDING bit for them, check in sysdev_suspend() if
any wake-up interrupts are pending and abort suspend if that's the
case.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>trivial: Fix misspelling of firmware</title>
<updated>2009-03-30T13:21:59Z</updated>
<author>
<name>Nick Andrew</name>
<email>nick@nick-andrew.net</email>
</author>
<published>2009-01-26T10:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=877d03105d04b2c13e241130277fa69c8d2564f0'/>
<id>urn:sha1:877d03105d04b2c13e241130277fa69c8d2564f0</id>
<content type='text'>
Fix misspelling of firmware.

Signed-off-by: Nick Andrew &lt;nick@nick-andrew.net&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>PM: Split up sysdev_[suspend|resume] from device_power_[down|up]</title>
<updated>2009-02-22T18:33:44Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2009-02-22T17:38:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=770824bdc421ff58a64db608294323571c949f4c'/>
<id>urn:sha1:770824bdc421ff58a64db608294323571c949f4c</id>
<content type='text'>
Move the sysdev_suspend/resume from the callee to the callers, with
no real change in semantics, so that we can rework the disabling of
interrupts during suspend/hibernation.

This is based on an earlier patch from Linus.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
