2 * Copyright 2001-2002 Pavel Machek <pavel@suse.cz>
4 * Copyright 2001 Patrick Mochel <mochel@osdl.org>
9 static inline int arch_prepare_suspend(void) { return 0; }
11 /* image of the saved processor state */
12 struct saved_context {
14 unsigned long cr0, cr2, cr3, cr4;
17 unsigned long gdt_base;
20 unsigned long idt_base;
25 unsigned long return_address;
26 } __attribute__((packed));
28 #ifdef CONFIG_ACPI_SLEEP
29 extern unsigned long saved_eip;
30 extern unsigned long saved_esp;
31 extern unsigned long saved_ebp;
32 extern unsigned long saved_ebx;
33 extern unsigned long saved_esi;
34 extern unsigned long saved_edi;
36 static inline void acpi_save_register_state(unsigned long return_point)
38 saved_eip = return_point;
39 asm volatile ("movl %%esp,%0" : "=m" (saved_esp));
40 asm volatile ("movl %%ebp,%0" : "=m" (saved_ebp));
41 asm volatile ("movl %%ebx,%0" : "=m" (saved_ebx));
42 asm volatile ("movl %%edi,%0" : "=m" (saved_edi));
43 asm volatile ("movl %%esi,%0" : "=m" (saved_esi));
46 #define acpi_restore_register_state() do {} while (0)
48 /* routines for saving/restoring kernel state */
49 extern int acpi_save_state_mem(void);