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