Re: [linux-pm] [PATCH -mm] kexec jump -v9

2008-05-15 Thread Alan Stern
On Wed, 14 May 2008, Eric W. Biederman wrote: My take on the situation is this. For proper handling we need driver device_detach and device_reattach methods. With the following semantics. The device_detach methods will disable DMA and place the hardware in a sane state from which the

Re: [linux-pm] [PATCH -mm] kexec jump -v9

2008-05-15 Thread Eric W. Biederman
Alan Stern [EMAIL PROTECTED] writes: On Wed, 14 May 2008, Eric W. Biederman wrote: My take on the situation is this. For proper handling we need driver device_detach and device_reattach methods. With the following semantics. The device_detach methods will disable DMA and place the

Re: [linux-pm] [PATCH -mm] kexec jump -v9

2008-05-15 Thread Eric W. Biederman
Rafael J. Wysocki [EMAIL PROTECTED] writes: On Thursday, 15 of May 2008, Eric W. Biederman wrote: Rafael J. Wysocki [EMAIL PROTECTED] writes: Just an added data partial point. In the kexec case I have had not heard anyone screaming to me that ACPI doesn't work after we switch kernels.

Re: [linux-pm] [PATCH -mm] kexec jump -v9

2008-05-15 Thread Rafael J. Wysocki
On Thursday, 15 of May 2008, Eric W. Biederman wrote: Rafael J. Wysocki [EMAIL PROTECTED] writes: On Thursday, 15 of May 2008, Eric W. Biederman wrote: Rafael J. Wysocki [EMAIL PROTECTED] writes: Just an added data partial point. In the kexec case I have had not heard anyone

Re: [PATCH -mm] kexec jump -v9

2008-05-15 Thread Rafael J. Wysocki
On Friday, 16 of May 2008, Eric W. Biederman wrote: Rafael J. Wysocki [EMAIL PROTECTED] writes: Well, it looks like we do similar things concurrently. Please have a look here: http://kerneltrap.org/Linux/Separating_Suspend_and_Hibernation Yes. Part of the reason I wanted to separate

[PATCH] Prototype ifdown() in kexec.h, not nested in main().

2008-05-15 Thread Jamey Sharp
Signed-off-by: Jamey Sharp [EMAIL PROTECTED] --- Another generic patch extracted from my Windows porting work. kexec/kexec.c |3 +-- kexec/kexec.h |2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kexec/kexec.c b/kexec/kexec.c index f898428..de9765e 100644 ---

[PATCH] Open slurped files in binary mode, on systems where that matters.

2008-05-15 Thread Jamey Sharp
Signed-off-by: Jamey Sharp [EMAIL PROTECTED] --- This patch shouldn't hurt any system that doesn't distinguish between binary and text files, and helps when running on Windows. kexec/kexec.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kexec/kexec.c

Re: [PATCH -mm] kexec jump -v9

2008-05-15 Thread Vivek Goyal
On Thu, May 15, 2008 at 01:41:50PM +0800, Huang, Ying wrote: Hi, Vivek, On Wed, 2008-05-14 at 16:52 -0400, Vivek Goyal wrote: [...] Ok, I have done some testing on this patch. Currently I have just tested switching back and forth between two kernels and it is working for me. Just

Re: [PATCH -mm] kexec jump -v9

2008-05-15 Thread Huang, Ying
On Thu, 2008-05-15 at 18:35 -0700, Eric W. Biederman wrote: Vivek Goyal [EMAIL PROTECTED] writes: ioapic_suspend() is not putting APICs in Legacy mode and that's why we are seeing the issue. It only saves the IOAPIC routing table entries and these entries are restored during

Re: [PATCH] kexec based hibernation: a prototype of kexec multi-stage load

2008-05-15 Thread Vivek Goyal
On Thu, May 15, 2008 at 12:57:53PM +0800, Huang, Ying wrote: On Wed, 2008-05-14 at 14:43 -0700, Eric W. Biederman wrote: [...] Then as a preliminary design let's plan on this. - Pass the rentry point as the return address (using the C ABI). We may want to load the stack pointer etc so

Re: [PATCH -mm] kexec jump -v9

2008-05-15 Thread Huang, Ying
On Thu, 2008-05-15 at 21:51 -0400, Vivek Goyal wrote: On Fri, May 16, 2008 at 09:48:34AM +0800, Huang, Ying wrote: On Thu, 2008-05-15 at 16:09 -0400, Vivek Goyal wrote: [...] Ok, You want to make BIOS calls. We already do that using vm86 mode and use bios real mode interrupts. So why do

Re: [PATCH] kexec based hibernation: a prototype of kexec multi-stage load

2008-05-15 Thread Huang, Ying
On Thu, 2008-05-15 at 22:00 -0400, Vivek Goyal wrote: [...] IMHO, this kind of make more sense to me when keeping C function like semantics in mind. Both the cases can be treated like calls to functions (calling BIOS function and jumping to kernel B). The basic difference between two cases

Re: [PATCH] kexec based hibernation: a prototype of kexec multi-stage load

2008-05-15 Thread Eric W. Biederman
Huang, Ying [EMAIL PROTECTED] writes: On Thu, 2008-05-15 at 11:39 -0700, Eric W. Biederman wrote: [...] 2) After we figure out our address read the stack pointer from a fixed location and simply set it. (This is my preference) Just for confirmation (My English is poor). Do you mean

Re: [PATCH] kexec based hibernation: a prototype of kexec multi-stage load

2008-05-15 Thread Huang, Ying
On Thu, 2008-05-15 at 19:25 -0700, Eric W. Biederman wrote: Huang, Ying [EMAIL PROTECTED] writes: On Thu, 2008-05-15 at 11:39 -0700, Eric W. Biederman wrote: [...] 2) After we figure out our address read the stack pointer from a fixed location and simply set it. (This is my

Re: [PATCH] kexec based hibernation: a prototype of kexec multi-stage load

2008-05-15 Thread Eric W. Biederman
Huang, Ying [EMAIL PROTECTED] writes: The disadvantage of this solution is that kernel B must know it is original kernel (A) or kexeced kernel (B). Different code should be used by kernel A and kernel B. And after jump from A to B, jump from B to A, when jump from A to B again, kernel A must

Re: [PATCH] kexec based hibernation: a prototype of kexec multi-stage load

2008-05-15 Thread Vivek Goyal
On Fri, May 16, 2008 at 10:56:15AM +0800, Huang, Ying wrote: On Thu, 2008-05-15 at 19:25 -0700, Eric W. Biederman wrote: Huang, Ying [EMAIL PROTECTED] writes: On Thu, 2008-05-15 at 11:39 -0700, Eric W. Biederman wrote: [...] 2) After we figure out our address read the stack pointer

Re: [PATCH] kexec based hibernation: a prototype of kexec multi-stage load

2008-05-15 Thread Eric W. Biederman
Huang, Ying [EMAIL PROTECTED] writes: I think it is reasonable to enable jumping back and forth more than one time. I'm not opposed. I just don't understand the utility yet. So the following should be possible: 1. Jump from A to B (actually jump to purgatory, trigger the boot of B) 2.