blob: 09b9620a73b4841893fc2bd01bfd614d43e7e214 [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 {
Chris Snook70353022007-10-20 02:56:59 -040012 void *ldt;
Chris Snook70353022007-10-20 02:56:59 -040013 int size;
Stephen Wilsonc2ef45d2011-03-13 15:49:13 -040014
15#ifdef CONFIG_X86_64
16 /* True if mm supports a task running in 32 bit compatibility mode. */
17 unsigned short ia32_compat;
18#endif
19
Richard Kennedyaf6a25f2011-05-24 14:49:59 +010020 struct mutex lock;
Andy Lutomirski6f121e52014-05-05 12:19:34 -070021 void __user *vdso;
Andy Lutomirski7911d3f2014-10-24 15:58:12 -070022
23 atomic_t perf_rdpmc_allowed; /* nonzero if rdpmc is allowed */
Chris Snook70353022007-10-20 02:56:59 -040024} mm_context_t;
25
Venki Pallipadibde6f5f2008-01-30 13:32:01 +010026#ifdef CONFIG_SMP
27void leave_mm(int cpu);
28#else
29static inline void leave_mm(int cpu)
30{
31}
32#endif
33
H. Peter Anvin1965aae2008-10-22 22:26:29 -070034#endif /* _ASM_X86_MMU_H */