H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_MMU_H |
| 2 | #define _ASM_X86_MMU_H |
Chris Snook | 7035302 | 2007-10-20 02:56:59 -0400 | [diff] [blame] | 3 | |
| 4 | #include <linux/spinlock.h> |
| 5 | #include <linux/mutex.h> |
| 6 | |
| 7 | /* |
| 8 | * The x86 doesn't have a mmu context, but |
| 9 | * we put the segment information here. |
Chris Snook | 7035302 | 2007-10-20 02:56:59 -0400 | [diff] [blame] | 10 | */ |
Joe Perches | 710d0e9 | 2008-03-23 01:02:44 -0700 | [diff] [blame] | 11 | typedef struct { |
Andy Lutomirski | a5b9e5a | 2015-07-30 14:31:34 -0700 | [diff] [blame] | 12 | #ifdef CONFIG_MODIFY_LDT_SYSCALL |
Andy Lutomirski | 37868fe | 2015-07-30 14:31:32 -0700 | [diff] [blame] | 13 | struct ldt_struct *ldt; |
Andy Lutomirski | a5b9e5a | 2015-07-30 14:31:34 -0700 | [diff] [blame] | 14 | #endif |
Stephen Wilson | c2ef45d | 2011-03-13 15:49:13 -0400 | [diff] [blame] | 15 | |
| 16 | #ifdef CONFIG_X86_64 |
| 17 | /* True if mm supports a task running in 32 bit compatibility mode. */ |
| 18 | unsigned short ia32_compat; |
| 19 | #endif |
| 20 | |
Richard Kennedy | af6a25f | 2011-05-24 14:49:59 +0100 | [diff] [blame] | 21 | struct mutex lock; |
Andy Lutomirski | 6f121e5 | 2014-05-05 12:19:34 -0700 | [diff] [blame] | 22 | void __user *vdso; |
Andy Lutomirski | 7911d3f | 2014-10-24 15:58:12 -0700 | [diff] [blame] | 23 | |
| 24 | atomic_t perf_rdpmc_allowed; /* nonzero if rdpmc is allowed */ |
Chris Snook | 7035302 | 2007-10-20 02:56:59 -0400 | [diff] [blame] | 25 | } mm_context_t; |
| 26 | |
Venki Pallipadi | bde6f5f | 2008-01-30 13:32:01 +0100 | [diff] [blame] | 27 | #ifdef CONFIG_SMP |
| 28 | void leave_mm(int cpu); |
| 29 | #else |
| 30 | static inline void leave_mm(int cpu) |
| 31 | { |
| 32 | } |
| 33 | #endif |
| 34 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 35 | #endif /* _ASM_X86_MMU_H */ |