fixmap.h (fba961ab29e5ffb055592442808bb0f7962e05da) fixmap.h (4fe2d8b11a370af286287a2661de9d4e6c9a145a)
1/*
2 * fixmap.h: compile-time virtual memory allocation
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1998 Ingo Molnar

--- 42 unchanged lines hidden (view full) ---

51 *
52 * Every field is a virtual alias of some other allocated backing store.
53 * There is no direct allocation of a struct cpu_entry_area.
54 */
55struct cpu_entry_area {
56 char gdt[PAGE_SIZE];
57
58 /*
1/*
2 * fixmap.h: compile-time virtual memory allocation
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1998 Ingo Molnar

--- 42 unchanged lines hidden (view full) ---

51 *
52 * Every field is a virtual alias of some other allocated backing store.
53 * There is no direct allocation of a struct cpu_entry_area.
54 */
55struct cpu_entry_area {
56 char gdt[PAGE_SIZE];
57
58 /*
59 * The GDT is just below SYSENTER_stack and thus serves (on x86_64) as
59 * The GDT is just below entry_stack and thus serves (on x86_64) as
60 * a a read-only guard page.
61 */
60 * a a read-only guard page.
61 */
62 struct SYSENTER_stack_page SYSENTER_stack_page;
62 struct entry_stack_page entry_stack_page;
63
64 /*
65 * On x86_64, the TSS is mapped RO. On x86_32, it's mapped RW because
66 * we need task switches to work, and task switches write to the TSS.
67 */
68 struct tss_struct tss;
69
70 char entry_trampoline[PAGE_SIZE];

--- 174 unchanged lines hidden (view full) ---

245#define get_cpu_entry_area_index(cpu, field) \
246 __get_cpu_entry_area_offset_index((cpu), offsetof(struct cpu_entry_area, field))
247
248static inline struct cpu_entry_area *get_cpu_entry_area(int cpu)
249{
250 return (struct cpu_entry_area *)__fix_to_virt(__get_cpu_entry_area_page_index(cpu, 0));
251}
252
63
64 /*
65 * On x86_64, the TSS is mapped RO. On x86_32, it's mapped RW because
66 * we need task switches to work, and task switches write to the TSS.
67 */
68 struct tss_struct tss;
69
70 char entry_trampoline[PAGE_SIZE];

--- 174 unchanged lines hidden (view full) ---

245#define get_cpu_entry_area_index(cpu, field) \
246 __get_cpu_entry_area_offset_index((cpu), offsetof(struct cpu_entry_area, field))
247
248static inline struct cpu_entry_area *get_cpu_entry_area(int cpu)
249{
250 return (struct cpu_entry_area *)__fix_to_virt(__get_cpu_entry_area_page_index(cpu, 0));
251}
252
253static inline struct SYSENTER_stack *cpu_SYSENTER_stack(int cpu)
253static inline struct entry_stack *cpu_entry_stack(int cpu)
254{
254{
255 return &get_cpu_entry_area(cpu)->SYSENTER_stack_page.stack;
255 return &get_cpu_entry_area(cpu)->entry_stack_page.stack;
256}
257
258#endif /* !__ASSEMBLY__ */
259#endif /* _ASM_X86_FIXMAP_H */
256}
257
258#endif /* !__ASSEMBLY__ */
259#endif /* _ASM_X86_FIXMAP_H */