blob: 55234d5e7160db83bd9854a40c87b8e70593b3c7 [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_MMU_H
2#define _ASM_X86_MMU_H
Chris Snook70353022007-10-20 02:56:59 -04003
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 Snook70353022007-10-20 02:56:59 -040010 */
Joe Perches710d0e92008-03-23 01:02:44 -070011typedef struct {
Andy Lutomirskia5b9e5a2015-07-30 14:31:34 -070012#ifdef CONFIG_MODIFY_LDT_SYSCALL
Andy Lutomirski37868fe2015-07-30 14:31:32 -070013 struct ldt_struct *ldt;
Andy Lutomirskia5b9e5a2015-07-30 14:31:34 -070014#endif
Stephen Wilsonc2ef45d2011-03-13 15:49:13 -040015
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 Kennedyaf6a25f2011-05-24 14:49:59 +010021 struct mutex lock;
Andy Lutomirski6f121e52014-05-05 12:19:34 -070022 void __user *vdso;
Andy Lutomirski7911d3f2014-10-24 15:58:12 -070023
24 atomic_t perf_rdpmc_allowed; /* nonzero if rdpmc is allowed */
Chris Snook70353022007-10-20 02:56:59 -040025} mm_context_t;
26
Venki Pallipadibde6f5f2008-01-30 13:32:01 +010027#ifdef CONFIG_SMP
28void leave_mm(int cpu);
29#else
30static inline void leave_mm(int cpu)
31{
32}
33#endif
34
H. Peter Anvin1965aae2008-10-22 22:26:29 -070035#endif /* _ASM_X86_MMU_H */