GNU Linux-libre 4.9.337-gnu1
[releases.git] / arch / x86 / include / asm / suspend_32.h
1 /*
2  * Copyright 2001-2002 Pavel Machek <pavel@suse.cz>
3  * Based on code
4  * Copyright 2001 Patrick Mochel <mochel@osdl.org>
5  */
6 #ifndef _ASM_X86_SUSPEND_32_H
7 #define _ASM_X86_SUSPEND_32_H
8
9 #include <asm/desc.h>
10 #include <asm/fpu/api.h>
11
12 /* image of the saved processor state */
13 struct saved_context {
14         /*
15          * On x86_32, all segment registers, with the possible exception of
16          * gs, are saved at kernel entry in pt_regs.
17          */
18 #ifdef CONFIG_X86_32_LAZY_GS
19         u16 gs;
20 #endif
21         unsigned long cr0, cr2, cr3, cr4;
22         u64 misc_enable;
23         struct saved_msrs saved_msrs;
24         struct desc_ptr gdt_desc;
25         struct desc_ptr idt;
26         u16 ldt;
27         u16 tss;
28         unsigned long tr;
29         unsigned long safety;
30         unsigned long return_address;
31         bool misc_enable_saved;
32 } __attribute__((packed));
33
34 #endif /* _ASM_X86_SUSPEND_32_H */