summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2002-06-02 23:25:44 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-06-02 23:25:44 -0700
commit14f546974ba896cff41ce0fc6fd8be36a4d533fa (patch)
treec20c4e9bc8c75db473972816b98cd9724e409020 /include
parent5ca5a885c49751852a4e78b3c529dbc8e3984e98 (diff)
[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.)
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/suspend.h24
1 files changed, 24 insertions, 0 deletions
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