x86: spinlock_32/64 substitute types and instructions
[linux-2.6/mini2440.git] / include / asm-x86 / suspend_64.h
blob4404668f9aa46b189bab36ec650f81e15d3072f8
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
9 #include <asm/desc.h>
10 #include <asm/i387.h>
12 static inline int
13 arch_prepare_suspend(void)
15 return 0;
19 * Image of the saved processor state, used by the low level ACPI suspend to
20 * RAM code and by the low level hibernation code.
22 * If you modify it, fix arch/x86/kernel/acpi/wakeup_64.S and make sure that
23 * __save/__restore_processor_state(), defined in arch/x86/kernel/suspend_64.c,
24 * still work as required.
26 struct saved_context {
27 struct pt_regs regs;
28 u16 ds, es, fs, gs, ss;
29 unsigned long gs_base, gs_kernel_base, fs_base;
30 unsigned long cr0, cr2, cr3, cr4, cr8;
31 unsigned long efer;
32 u16 gdt_pad;
33 u16 gdt_limit;
34 unsigned long gdt_base;
35 u16 idt_pad;
36 u16 idt_limit;
37 unsigned long idt_base;
38 u16 ldt;
39 u16 tss;
40 unsigned long tr;
41 unsigned long safety;
42 unsigned long return_address;
43 } __attribute__((packed));
45 #define loaddebug(thread,register) \
46 set_debugreg((thread)->debugreg##register, register)
48 extern void fix_processor_context(void);
50 /* routines for saving/restoring kernel state */
51 extern int acpi_save_state_mem(void);
52 extern char core_restore_code;
53 extern char restore_registers;
55 #endif /* __ASM_X86_64_SUSPEND_H */