diff options
Diffstat (limited to 'include/asm-x86/mmu_context.h')
-rw-r--r-- | include/asm-x86/mmu_context.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/asm-x86/mmu_context.h b/include/asm-x86/mmu_context.h index 6598450da6c6..fac57014e7c6 100644 --- a/include/asm-x86/mmu_context.h +++ b/include/asm-x86/mmu_context.h | |||
@@ -1,5 +1,37 @@ | |||
1 | #ifndef __ASM_X86_MMU_CONTEXT_H | ||
2 | #define __ASM_X86_MMU_CONTEXT_H | ||
3 | |||
4 | #include <asm/desc.h> | ||
5 | #include <asm/atomic.h> | ||
6 | #include <asm/pgalloc.h> | ||
7 | #include <asm/tlbflush.h> | ||
8 | #include <asm/paravirt.h> | ||
9 | #ifndef CONFIG_PARAVIRT | ||
10 | #include <asm-generic/mm_hooks.h> | ||
11 | |||
12 | static inline void paravirt_activate_mm(struct mm_struct *prev, | ||
13 | struct mm_struct *next) | ||
14 | { | ||
15 | } | ||
16 | #endif /* !CONFIG_PARAVIRT */ | ||
17 | |||
18 | /* | ||
19 | * Used for LDT copy/destruction. | ||
20 | */ | ||
21 | int init_new_context(struct task_struct *tsk, struct mm_struct *mm); | ||
22 | void destroy_context(struct mm_struct *mm); | ||
23 | |||
1 | #ifdef CONFIG_X86_32 | 24 | #ifdef CONFIG_X86_32 |
2 | # include "mmu_context_32.h" | 25 | # include "mmu_context_32.h" |
3 | #else | 26 | #else |
4 | # include "mmu_context_64.h" | 27 | # include "mmu_context_64.h" |
5 | #endif | 28 | #endif |
29 | |||
30 | #define activate_mm(prev, next) \ | ||
31 | do { \ | ||
32 | paravirt_activate_mm((prev), (next)); \ | ||
33 | switch_mm((prev), (next), NULL); \ | ||
34 | } while (0); | ||
35 | |||
36 | |||
37 | #endif /* __ASM_X86_MMU_CONTEXT_H */ | ||