swsusp: rewrite critical parts to assembly
Hi!
This rewrites parts that can not be safely written in C to assembly. This time with S3 code, too, so you no longer see moves to %esp in C code. Please apply,
Pavel
arch/i386/kernel/Makefile +1 -1
@@ -25,7 +25,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 +obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o suspend_asm.o obj-$(CONFIG_X86_NUMAQ) += numaq.o obj-$(CONFIG_PROFILING) += profile.o obj-$(CONFIG_EDD) += edd.o
arch/i386/kernel/acpi_wakeup.S +42 -0
48 lines not on this page · raw message
arch/i386/kernel/suspend.c +8 -176
237 lines not on this page · raw message
arch/i386/kernel/suspend_asm.S +80 -0
80 lines not on this page · raw message
include/asm-i386/suspend.h +6 -3
@@ -15,8 +15,6 @@/* image of the saved processor state */ struct saved_context { -unsigned long eax, ebx, ecx, edx; -unsigned long esp, ebp, esi, edi;u16 es, fs, gs, ss;unsigned long cr0, cr2, cr3, cr4;u16 gdt_pad;
@@ -30,9 +28,14 @@unsigned long tr;unsigned long safety;unsigned long return_address; -unsigned long eflags; } __attribute__((packed)); +/* We'll access these from assembly, so we'd better have them outside struct */ +extern unsigned long saved_context_eax, saved_context_ebx, saved_context_ecx, saved_context_edx; +extern unsigned long saved_context_esp, saved_context_ebp, saved_context_esi, saved_context_edi; +extern unsigned long saved_context_eflags; + +#define loaddebug (thread,register) \ __asm__("movl %0,%%db" #register \ :/* no output */ \
Signature · 2 lines
Worst form of spam? Adding advertisment signatures ala sourceforge.net. What goes next? Inserting advertisment *into* email?