swsusp, S3: cleanups, support 64-bit machines, md support
Hi!
This adds support for 64-bit machines (I've actually done swsusp on hammer, wow!, but that still has to be cleaned up a lot), cleans things up a bit, and adds preliminary support to md.c. Oh and it will no longer call device drivers resume method with interrupts off, and will use akpm's memory freeing. Please apply,
Pavel
arch/i386/kernel/acpi_wakeup.S +10 -6
@@ -1,11 +1,16 @@ - .text #include <linux/linkage.h> #include <asm/segment.h> +#include <asm/page.h> -# Do we need to deal with A20? +# +# wakeup_code runs in real mode, and at unknown address (determined at run-time). +# Therefore it must only use relative jumps/calls. +# +# Do we need to deal with A20? It seems okay ALIGN + .align 4096 wakeup_start: wakeup_code: wakeup_code_start = .
@@ -228,7 +262,7 @@ movl %eax, %edi leal wakeup_start, %esi - movl $(wakeup_end - wakeup_start) >> 2, %ecx + movl $(wakeup_end - wakeup_start + 3) >> 2, %ecx rep ; movsl
@@ -290,8 +324,8 @@ ret .p2align 4,,7 .L1432: - movl $104,%eax - movw %eax, %ds + movl $__KERNEL_DS,%eax + movw %ax, %ds movl saved_context_esp, %esp movl saved_context_ebp, %ebp movl saved_context_eax, %eax
@@ -310,5 +344,4 @@ saved_idt: .long 0,0 saved_ldt: .long 0 saved_tss: .long 0 -saved_cr0: .long 0
drivers/md/md.c +6 -0
@@ -36,6 +36,7 @@#include <linux/bio.h> #include <linux/devfs_fs_kernel.h> #include <linux/buffer_head.h> /* for invalidate_bdev */ +#include <linux/suspend.h> #include <linux/init.h>
@@ -2470,6 +2471,8 @@wait_event_interruptible (thread->wqueue,test_bit (THREAD_WAKEUP , &thread->flags)); +if (current->flags &PF_FREEZE ) +refrigerator (PF_IOTHREAD );clear_bit (THREAD_WAKEUP , &thread->flags);
@@ -2909,6 +2918,9 @@*/ cond_resched (); +if (current->flags &PF_FREEZE ) +refrigerator (PF_IOTHREAD ); + currspeed = (j-mddev->resync_mark_cnt)/2 /((jiffies-mddev->resync_mark)/HZ +1 ) +1 ;if (currspeed > sysctl_speed_limit_min) {
kernel/suspend.c +34 -27
169 lines not on this page · raw message
Signature · 2 lines
Worst form of spam? Adding advertisment signatures ala sourceforge.net. What goes next? Inserting advertisment *into* email?