<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/power, branch v2.6.27.25</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/power?h=v2.6.27.25</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/power?h=v2.6.27.25'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2008-08-28T19:27:39Z</updated>
<entry>
<title>ftrace: disable tracing for hibernation</title>
<updated>2008-08-28T19:27:39Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2008-08-28T12:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=41108eb10142e0552f2de1e4c0675b108c5f018f'/>
<id>urn:sha1:41108eb10142e0552f2de1e4c0675b108c5f018f</id>
<content type='text'>
In accordance with commit f42ac38c59e0a03d6da0c24a63fb211393f484b0
("ftrace: disable tracing for suspend to ram"), disable tracing
around the suspend code in hibernation code paths.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ftrace: disable tracing for suspend to ram</title>
<updated>2008-08-27T20:54:20Z</updated>
<author>
<name>Steven Rostedt</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2008-08-27T13:14:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f42ac38c59e0a03d6da0c24a63fb211393f484b0'/>
<id>urn:sha1:f42ac38c59e0a03d6da0c24a63fb211393f484b0</id>
<content type='text'>
I've been painstakingly debugging the issue with suspend to ram and
ftraced. The 2.6.28 code does not have this issue, but since the mcount
recording is not going to be in 27, this must be solved for the ftrace
daemon version.

The resume from suspend to ram would reboot because it was triple
faulting. Debugging further, I found that calling the mcount function
itself was not an issue, but it would fault when it incremented
preempt_count. preempt_count is on the tasks info structure that is on the
low memory address of the task's stack.  For some reason, it could not
write to it. Resuming out of suspend to ram does quite a lot of funny
tricks to get to work, so it is not surprising at all that simply doing a
preempt_disable() would cause a fault.

Thanks to Rafael for suggesting to add a "while (1);" to find the place in
resuming that is causing the fault. I would place the loop somewhere in
the code, compile and reboot and see if it would either reboot (hit the
fault) or simply hang (hit the loop).  Doing this over and over again, I
narrowed it down that it was happening in enable_nonboot_cpus.

At this point, I found that it is easier to simply disable tracing around
the suspend code, instead of searching for the particular function that
can not handle doing a preempt_disable.

This patch disables the tracer as it suspends and reenables it on resume.

I tested this patch on my Laptop, and it can resume fine with the patch.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
Acked-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>removed unused #include &lt;linux/version.h&gt;'s</title>
<updated>2008-08-23T19:14:12Z</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-08-17T14:36:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7a8fc9b248e77a4eab0613acf30a6811799786b3'/>
<id>urn:sha1:7a8fc9b248e77a4eab0613acf30a6811799786b3</id>
<content type='text'>
This patch lets the files using linux/version.h match the files that
#include it.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kexec jump: save/restore device state</title>
<updated>2008-07-26T19:00:04Z</updated>
<author>
<name>Huang Ying</name>
<email>ying.huang@intel.com</email>
</author>
<published>2008-07-26T02:45:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=89081d17f7bb81d89fa1aa9b70f821c5cf4d39e9'/>
<id>urn:sha1:89081d17f7bb81d89fa1aa9b70f821c5cf4d39e9</id>
<content type='text'>
This patch implements devices state save/restore before after kexec.

This patch together with features in kexec_jump patch can be used for
following:

- A simple hibernation implementation without ACPI support.  You can kexec a
  hibernating kernel, save the memory image of original system and shutdown
  the system.  When resuming, you restore the memory image of original system
  via ordinary kexec load then jump back.

- Kernel/system debug through making system snapshot.  You can make system
  snapshot, jump back, do some thing and make another system snapshot.

- Cooperative multi-kernel/system.  With kexec jump, you can switch between
  several kernels/systems quickly without boot process except the first time.
  This appears like swap a whole kernel/system out/in.

- A general method to call program in physical mode (paging turning
  off). This can be used to invoke BIOS code under Linux.

The following user-space tools can be used with kexec jump:

- kexec-tools needs to be patched to support kexec jump. The patches
  and the precompiled kexec can be download from the following URL:
       source: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-src_git_kh10.tar.bz2
       patches: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec-tools-patches_git_kh10.tar.bz2
       binary: http://khibernation.sourceforge.net/download/release_v10/kexec-tools/kexec_git_kh10

- makedumpfile with patches are used as memory image saving tool, it
  can exclude free pages from original kernel memory image file. The
  patches and the precompiled makedumpfile can be download from the
  following URL:
       source: http://khibernation.sourceforge.net/download/release_v10/makedumpfile/makedumpfile-src_cvs_kh10.tar.bz2
       patches: http://khibernation.sourceforge.net/download/release_v10/makedumpfile/makedumpfile-patches_cvs_kh10.tar.bz2
       binary: http://khibernation.sourceforge.net/download/release_v10/makedumpfile/makedumpfile_cvs_kh10

- An initramfs image can be used as the root file system of kexeced
  kernel. An initramfs image built with "BuildRoot" can be downloaded
  from the following URL:
       initramfs image: http://khibernation.sourceforge.net/download/release_v10/initramfs/rootfs_cvs_kh10.gz
  All user space tools above are included in the initramfs image.

Usage example of simple hibernation:

1. Compile and install patched kernel with following options selected:

CONFIG_X86_32=y
CONFIG_RELOCATABLE=y
CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_PM=y
CONFIG_HIBERNATION=y
CONFIG_KEXEC_JUMP=y

2. Build an initramfs image contains kexec-tool and makedumpfile, or
   download the pre-built initramfs image, called rootfs.gz in
   following text.

3. Prepare a partition to save memory image of original kernel, called
   hibernating partition in following text.

4. Boot kernel compiled in step 1 (kernel A).

5. In the kernel A, load kernel compiled in step 1 (kernel B) with
   /sbin/kexec. The shell command line can be as follow:

   /sbin/kexec --load-preserve-context /boot/bzImage --mem-min=0x100000
     --mem-max=0xffffff --initrd=rootfs.gz

6. Boot the kernel B with following shell command line:

   /sbin/kexec -e

7. The kernel B will boot as normal kexec. In kernel B the memory
   image of kernel A can be saved into hibernating partition as
   follow:

   jump_back_entry=`cat /proc/cmdline | tr ' ' '\n' | grep kexec_jump_back_entry | cut -d '='`
   echo $jump_back_entry &gt; kexec_jump_back_entry
   cp /proc/vmcore dump.elf

   Then you can shutdown the machine as normal.

8. Boot kernel compiled in step 1 (kernel C). Use the rootfs.gz as
   root file system.

9. In kernel C, load the memory image of kernel A as follow:

   /sbin/kexec -l --args-none --entry=`cat kexec_jump_back_entry` dump.elf

10. Jump back to the kernel A as follow:

   /sbin/kexec -e

   Then, kernel A is resumed.

Implementation point:

To support jumping between two kernels, before jumping to (executing)
the new kernel and jumping back to the original kernel, the devices
are put into quiescent state, and the state of devices and CPU is
saved. After jumping back from kexeced kernel and jumping to the new
kernel, the state of devices and CPU are restored accordingly. The
devices/CPU state save/restore code of software suspend is called to
implement corresponding function.

Known issues:

- Because the segment number supported by sys_kexec_load is limited,
  hibernation image with many segments may not be load. This is
  planned to be eliminated by adding a new flag to sys_kexec_load to
  make a image can be loaded with multiple sys_kexec_load invoking.

Now, only the i386 architecture is supported.

Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Acked-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Nigel Cunningham &lt;nigel@nigel.suspend2.net&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&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 selftest: rtc paranoia</title>
<updated>2008-07-26T19:00:02Z</updated>
<author>
<name>David Brownell</name>
<email>dbrownell@users.sourceforge.net</email>
</author>
<published>2008-07-26T02:44:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a2e2e3577c3ef2b5dbb866e97e612aae4adfa32f'/>
<id>urn:sha1:a2e2e3577c3ef2b5dbb866e97e612aae4adfa32f</id>
<content type='text'>
Cope with a quirk of some RTCs (notably ACPI ones) which aren't guaranteed
to implement oneshot behavior when they woke the system from sleeep:
forcibly disable the alarm, just in case.

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&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: fix try_to_freeze_tasks()'s use of do_div()</title>
<updated>2008-07-24T17:47:24Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2008-07-24T04:28:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f0af566da6e9a4a2f5a83c5a70f3d0a772050e21'/>
<id>urn:sha1:f0af566da6e9a4a2f5a83c5a70f3d0a772050e21</id>
<content type='text'>
Fix try_to_freeze_tasks()'s use of do_div() on an s64 by making
elapsed_csecs64 a u64 instead and dividing that.

Possibly this should be guarded lest the interval calculation turn up
negative, but the possible negativity of the result of the division is
cast away anyway.

This was introduced by patch 438e2ce68dfd4af4cfcec2f873564fb921db4bb5.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&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: schedule sysrq poweroff on boot cpu</title>
<updated>2008-07-24T17:47:24Z</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2008-07-24T04:28:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2f15fc4bdf91eb399da3f47a09c55831d9f22826'/>
<id>urn:sha1:2f15fc4bdf91eb399da3f47a09c55831d9f22826</id>
<content type='text'>
schedule sysrq poweroff on boot cpu.

sysrq poweroff needs to disable nonboot cpus, and we need to run this on boot
cpu to avoid any recursion.  http://bugzilla.kernel.org/show_bug.cgi?id=10897

[kosaki.motohiro@jp.fujitsu.com: build fix]
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Tested-by: Rus &lt;harbour@sfinx.od.ua&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&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: hibernation: simplify memory bitmap</title>
<updated>2008-07-24T17:47:23Z</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2008-07-24T04:28:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0d83304c7e7bd3b05be90281b3a47841bc8f057a'/>
<id>urn:sha1:0d83304c7e7bd3b05be90281b3a47841bc8f057a</id>
<content type='text'>
This patch simplifies the memory bitmap manipulations.

- remove the member size in struct bm_block

It is not necessary for struct bm_block to have the number of bit chunks that
can be calculated by using end_pfn and start_pfn.

- use find_next_bit() for memory_bm_next_pfn

No need to invent the bitmap library only for the memory bitmap.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&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: boot time suspend selftest</title>
<updated>2008-07-24T17:47:22Z</updated>
<author>
<name>David Brownell</name>
<email>dbrownell@users.sourceforge.net</email>
</author>
<published>2008-07-24T04:28:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=77437fd4e61f87cc94d9314baa5cbf50e3ccdf54'/>
<id>urn:sha1:77437fd4e61f87cc94d9314baa5cbf50e3ccdf54</id>
<content type='text'>
Boot-time test for system suspend states (STR or standby).  The generic
RTC framework triggers wakeup alarms, which are used to exit those states.

  - Measures some aspects of suspend time ... this uses "jiffies" until
    someone converts it to use a timebase that works properly even while
    timer IRQs are disabled.

  - Triggered by a command line parameter.  By default nothing even
    vaguely troublesome will happen, but "test_suspend=mem" will give
    you a brief STR test during system boot.  (Or you may need to use
    "test_suspend=standby" instead, if your hardware needs that.)

This isn't without problems.  It fires early enough during boot that for
example both PCMCIA and MMC stacks have misbehaved.  The workaround in
those cases was to boot without such media cards inserted.

[matthltc@us.ibm.com: fix compile failure in boot time suspend selftest]
Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Pavel Machek &lt;pavel@suse.cz&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Signed-off-by: Matt Helsley &lt;matthltc@us.ibm.com&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>Merge branch 'linus' into xen-64bit</title>
<updated>2008-07-17T21:57:20Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-07-17T21:57:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=393d81aa026e19b6ede6f5f11955c97ee62e5df5'/>
<id>urn:sha1:393d81aa026e19b6ede6f5f11955c97ee62e5df5</id>
<content type='text'>
</content>
</entry>
</feed>
