i386: NX emulation
[linux-flexiantxendom0-natty.git] / arch / x86 / include / asm / mmu.h
1 #ifndef _ASM_X86_MMU_H
2 #define _ASM_X86_MMU_H
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.
10  *
11  * exec_limit is used to track the range PROT_EXEC
12  * mappings span.
13  */
14 typedef struct {
15         void *ldt;
16         int size;
17         struct mutex lock;
18         void *vdso;
19 #ifdef CONFIG_X86_32
20         struct desc_struct user_cs;
21         unsigned long exec_limit;
22 #endif
23 } mm_context_t;
24
25 #ifdef CONFIG_SMP
26 void leave_mm(int cpu);
27 #else
28 static inline void leave_mm(int cpu)
29 {
30 }
31 #endif
32
33 #endif /* _ASM_X86_MMU_H */