1
2 #ifndef _ASM_X86_MMU_H
3 #define _ASM_X86_MMU_H
4
5 #include <linux/spinlock.h>
6 #include <linux/rwsem.h>
7 #include <linux/mutex.h>
8 #include <linux/atomic.h>
9
10
11
12
13 typedef struct {
14
15
16
17
18 u64 ctx_id;
19
20
21
22
23
24
25
26
27
28 atomic64_t tlb_gen;
29
30 #ifdef CONFIG_MODIFY_LDT_SYSCALL
31 struct rw_semaphore ldt_usr_sem;
32 struct ldt_struct *ldt;
33 #endif
34
35 #ifdef CONFIG_X86_64
36
37 unsigned short ia32_compat;
38 #endif
39
40 struct mutex lock;
41 void __user *vdso;
42 const struct vdso_image *vdso_image;
43
44 atomic_t perf_rdpmc_allowed;
45 #ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
46
47
48
49
50 u16 pkey_allocation_map;
51 s16 execute_only_pkey;
52 #endif
53 #ifdef CONFIG_X86_INTEL_MPX
54
55 void __user *bd_addr;
56 #endif
57 } mm_context_t;
58
59 #define INIT_MM_CONTEXT(mm) \
60 .context = { \
61 .ctx_id = 1, \
62 .lock = __MUTEX_INITIALIZER(mm.context.lock), \
63 }
64
65 void leave_mm(int cpu);
66
67 #endif