PATCH: swsusp - 2.5.66 incremental
Hi.
Here's the first incremental patch for you, Pavel. As requested, I've sent patches to Alan Cox (ide-disk.c) and Richard Gooch (mtrrs - I didn't implement the driver model - just attached the relevant portion and asked for his feedback). This is patch 3, then.
It's pretty simple - just replaces (temporarily) the assembly with code that we can patch, as we've previously discussed. You'll remember that I found I needed to use the 2.4 version to get it working - that's what's included here. Only one small change - it uses longs rather than chars during copying, making restoring the image take 1/4 of the time. (Not significant when there are only 2000 pages being saved, but remember this is groundwork for future patches).
I'm off to bed now. You won't hear from me again for ~36 hours. Feel free to flame/correct in the meantime :>
Regards,
Nigel
arch/i386/kernel/Makefile +1 -1
@@ -23,7 +23,7 @@ obj-$(CONFIG_X86_MPPARSE) += mpparse.o obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o obj-$(CONFIG_X86_IO_APIC) += io_apic.o -obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o suspend_asm.o +obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o swsusp.o obj-$(CONFIG_X86_NUMAQ) += numaq.o obj-$(CONFIG_EDD) += edd.o obj-$(CONFIG_MODULES) += module.o
arch/i386/kernel/swsusp.c +273 -0
273 lines not on this page · raw message
kernel/suspend.c +2 -2
@@ -869,7 +869,7 @@* unsuspends all device drivers, and writes memory to disk * using normal kernel mechanism. */ -do_magic (0 ); +do_swsusp_lowlevel (0 );PRINTK ("Restarting processes...\n" );thaw_processes (); }
@@ -1232,7 +1232,7 @@printk ("resuming from %s\n" , resume_file);if (read_suspend_image (resume_file,0 )) goto read_failure; -do_magic (1 ); +do_swsusp_lowlevel (1 );panic ("This never returns" ); read_failure:
Hi!
Quoted 4 lines
Here's the first incremental patch for you, Pavel. As requested, I've sent patches to Alan Cox (
ide-disk.c) and Richard Gooch (mtrrs - I didn't implement the driver model - just attached the relevant portion and asked for his feedback). This is patch 3, then.
You really should have moved it to the driver model... having #ifdef in suspend.c for every driver would be very ugly.
Quoted 7 lines
It's pretty simple - just replaces (temporarily) the assembly with code that we can patch, as we've previously discussed. You'll remember that I found I needed to use the 2.4 version to get it working - that's what's included here. Only one small change - it uses longs rather than chars during copying, making restoring the image take 1/4 of the time. (Not significant when there are only 2000 pages being saved, but remember this is groundwork for future patches).
I'm not going to take this, because I would not be able to sync this to Linus (and have enough problems keeping my patches up-to-date already).
Pavel
Signature · 2 lines
Horseback riding is like software... ...vgf orggre jura vgf serr.
Okay. So what do I have to do to get it taken?
Regards,
Nigel
Quoted 3 lines · Pavel Machek
I'm not going to take this, because I would not be able to sync this to Linus (and have enough problems keeping my patches up-to-date already).
Hi!
Quoted 1 line
Okay. So what do I have to do to get it taken?
Well, pretend it was taken and continue. When the time comes for a real merge, gcc -S your files to generate assembly, and provide nice patch to the .S file.
Pavel
Signature · 1 line
When do you have heart between your knees?
Quoted 2 lines · Pavel Machek
You really should have moved it to the driver model... having #ifdef in
suspend.cfor every driver would be very ugly.
Sorry. I thought that was the maintainer's job.
Regards,
Nigel
Hi!
Quoted 4 lines
Quoted 2 lines
You really should have moved it to the driver model... having #ifdef in
suspend.cfor every driver would be very ugly.Sorry. I thought that was the maintainer's job.
Well, his job is to tell you to do it properly. Don't expect him to do the rewriting himself. [Also he probably is not using swsusp so he would not test that.]
Pavel
Signature · 1 line
When do you have heart between your knees?
Quoted 10 lines · Pavel Machek
Hi!
Quoted 4 lines
Quoted 2 lines
You really should have moved it to the driver model... having #ifdef in
suspend.cfor every driver would be very ugly.Sorry. I thought that was the maintainer's job.
Well, his job is to tell you to do it properly. Don't expect him to do the rewriting himself. [Also he probably is not using swsusp so he would not test that.]
Pavel
Ah. Okay. So I learn something else about the way kernel develepment works... the maintainer doesn't actually maintain the code! Guess I need to learn the driver model stuff.
Regards,
Nigel