From 14f546974ba896cff41ce0fc6fd8be36a4d533fa Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Sun, 2 Jun 2002 23:25:44 -0700 Subject: [PATCH] Fix suspend-to-RAM in 2.5.20 I created arch/i386/suspend.c not to clash with ACPI people so much in future. (More stuff is going to move into it in the future, to clean up functions that really do not belong to the headers.) --- include/asm-i386/suspend.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'include') diff --git a/include/asm-i386/suspend.h b/include/asm-i386/suspend.h index 203e10e23cb7..b41d88f45928 100644 --- a/include/asm-i386/suspend.h +++ b/include/asm-i386/suspend.h @@ -294,3 +294,27 @@ static void do_magic(int resume) } #endif +#ifdef CONFIG_ACPI_SLEEP +extern unsigned long saved_eip; +extern unsigned long saved_esp; +extern unsigned long saved_ebp; +extern unsigned long saved_ebx; +extern unsigned long saved_esi; +extern unsigned long saved_edi; + +static inline void acpi_save_register_state(unsigned long return_point) +{ + saved_eip = return_point; + asm volatile ("movl %%esp,(%0)" : "=m" (saved_esp)); + asm volatile ("movl %%ebp,(%0)" : "=m" (saved_ebp)); + asm volatile ("movl %%ebx,(%0)" : "=m" (saved_ebx)); + asm volatile ("movl %%edi,(%0)" : "=m" (saved_edi)); + asm volatile ("movl %%esi,(%0)" : "=m" (saved_esi)); +} + +#define acpi_restore_register_state() do {} while (0) + +/* routines for saving/restoring kernel state */ +extern int acpi_save_state_mem(void); +extern int acpi_save_state_disk(void); +#endif -- cgit v1.2.3