include/asm-x86/irq_64.h: checkpatch cleanups - formatting only
[sfrench/cifs-2.6.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 /*
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.
21  *
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.
25  */
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));
44
45 #define loaddebug(thread,register) \
46         set_debugreg((thread)->debugreg##register, register)
47
48 /* routines for saving/restoring kernel state */
49 extern int acpi_save_state_mem(void);
50 extern char core_restore_code;
51 extern char restore_registers;
52
53 #endif /* __ASM_X86_64_SUSPEND_H */