]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - include/asm-x86/suspend_64.h
c505a76bcf6e93862b9e77dcccbe3afa02b14629
[linux-2.6-omap-h63xx.git] / include / asm-x86 / suspend_64.h
1 /*
2  * Copyright 2001-2003 Pavel Machek <pavel@suse.cz>
3  * Based on code
4  * Copyright 2001 Patrick Mochel <mochel@osdl.org>
5  */
6 #ifndef __ASM_X86_64_SUSPEND_H
7 #define __ASM_X86_64_SUSPEND_H
8
9 #include <asm/desc.h>
10 #include <asm/i387.h>
11
12 static inline int
13 arch_prepare_suspend(void)
14 {
15         return 0;
16 }
17
18 /* Image of the saved processor state. If you touch this, fix acpi/wakeup.S. */
19 struct saved_context {
20         struct pt_regs regs;
21         u16 ds, es, fs, gs, ss;
22         unsigned long gs_base, gs_kernel_base, fs_base;
23         unsigned long cr0, cr2, cr3, cr4, cr8;
24         unsigned long efer;
25         u16 gdt_pad;
26         u16 gdt_limit;
27         unsigned long gdt_base;
28         u16 idt_pad;
29         u16 idt_limit;
30         unsigned long idt_base;
31         u16 ldt;
32         u16 tss;
33         unsigned long tr;
34         unsigned long safety;
35         unsigned long return_address;
36 } __attribute__((packed));
37
38 #define loaddebug(thread,register) \
39         set_debugreg((thread)->debugreg##register, register)
40
41 extern void fix_processor_context(void);
42
43 /* routines for saving/restoring kernel state */
44 extern int acpi_save_state_mem(void);
45 extern char core_restore_code;
46 extern char restore_registers;
47
48 #endif /* __ASM_X86_64_SUSPEND_H */