x86/amd-iommu: Improve handling of full command buffer
[linux/fpc-iii.git] / arch / x86 / include / asm / suspend_64.h
blob8d942afae681bec8fe2c47a9bf57955dbc4317b0
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_SUSPEND_64_H
7 #define _ASM_X86_SUSPEND_64_H
9 #include <asm/desc.h>
10 #include <asm/i387.h>
12 static inline int arch_prepare_suspend(void)
14 return 0;
18 * Image of the saved processor state, used by the low level ACPI suspend to
19 * RAM code and by the low level hibernation code.
21 * If you modify it, fix arch/x86/kernel/acpi/wakeup_64.S and make sure that
22 * __save/__restore_processor_state(), defined in arch/x86/kernel/suspend_64.c,
23 * still work as required.
25 struct saved_context {
26 struct pt_regs regs;
27 u16 ds, es, fs, gs, ss;
28 unsigned long gs_base, gs_kernel_base, fs_base;
29 unsigned long cr0, cr2, cr3, cr4, cr8;
30 u64 misc_enable;
31 bool misc_enable_saved;
32 unsigned long efer;
33 u16 gdt_pad;
34 u16 gdt_limit;
35 unsigned long gdt_base;
36 u16 idt_pad;
37 u16 idt_limit;
38 unsigned long idt_base;
39 u16 ldt;
40 u16 tss;
41 unsigned long tr;
42 unsigned long safety;
43 unsigned long return_address;
44 } __attribute__((packed));
46 #define loaddebug(thread,register) \
47 set_debugreg((thread)->debugreg##register, register)
49 /* routines for saving/restoring kernel state */
50 extern int acpi_save_state_mem(void);
51 extern char core_restore_code;
52 extern char restore_registers;
54 #endif /* _ASM_X86_SUSPEND_64_H */