blob: 5f55e69627692f9a353355bbb426ef8bf73fc44c [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;
21 void *vdso;
Chris Snook70353022007-10-20 02:56:59 -040022} mm_context_t;
23
Venki Pallipadibde6f5f2008-01-30 13:32:01 +010024#ifdef CONFIG_SMP
25void leave_mm(int cpu);
26#else
27static inline void leave_mm(int cpu)
28{
29}
30#endif
31
H. Peter Anvin1965aae2008-10-22 22:26:29 -070032#endif /* _ASM_X86_MMU_H */