diff options
Diffstat (limited to 'include/asm-arm/mmu_context.h')
| -rw-r--r-- | include/asm-arm/mmu_context.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h index 81c59facea3b..d1a65b1edcaa 100644 --- a/include/asm-arm/mmu_context.h +++ b/include/asm-arm/mmu_context.h | |||
| @@ -17,6 +17,8 @@ | |||
| 17 | #include <asm/cacheflush.h> | 17 | #include <asm/cacheflush.h> |
| 18 | #include <asm/proc-fns.h> | 18 | #include <asm/proc-fns.h> |
| 19 | 19 | ||
| 20 | void __check_kvm_seq(struct mm_struct *mm); | ||
| 21 | |||
| 20 | #if __LINUX_ARM_ARCH__ >= 6 | 22 | #if __LINUX_ARM_ARCH__ >= 6 |
| 21 | 23 | ||
| 22 | /* | 24 | /* |
| @@ -45,13 +47,21 @@ static inline void check_context(struct mm_struct *mm) | |||
| 45 | { | 47 | { |
| 46 | if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) | 48 | if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) |
| 47 | __new_context(mm); | 49 | __new_context(mm); |
| 50 | |||
| 51 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | ||
| 52 | __check_kvm_seq(mm); | ||
| 48 | } | 53 | } |
| 49 | 54 | ||
| 50 | #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) | 55 | #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) |
| 51 | 56 | ||
| 52 | #else | 57 | #else |
| 53 | 58 | ||
| 54 | #define check_context(mm) do { } while (0) | 59 | static inline void check_context(struct mm_struct *mm) |
| 60 | { | ||
| 61 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | ||
| 62 | __check_kvm_seq(mm); | ||
| 63 | } | ||
| 64 | |||
| 55 | #define init_new_context(tsk,mm) 0 | 65 | #define init_new_context(tsk,mm) 0 |
| 56 | 66 | ||
| 57 | #endif | 67 | #endif |
| @@ -82,6 +92,7 @@ static inline void | |||
| 82 | switch_mm(struct mm_struct *prev, struct mm_struct *next, | 92 | switch_mm(struct mm_struct *prev, struct mm_struct *next, |
| 83 | struct task_struct *tsk) | 93 | struct task_struct *tsk) |
| 84 | { | 94 | { |
| 95 | #ifdef CONFIG_MMU | ||
| 85 | unsigned int cpu = smp_processor_id(); | 96 | unsigned int cpu = smp_processor_id(); |
| 86 | 97 | ||
| 87 | if (prev != next) { | 98 | if (prev != next) { |
| @@ -91,6 +102,7 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
| 91 | if (cache_is_vivt()) | 102 | if (cache_is_vivt()) |
| 92 | cpu_clear(cpu, prev->cpu_vm_mask); | 103 | cpu_clear(cpu, prev->cpu_vm_mask); |
| 93 | } | 104 | } |
| 105 | #endif | ||
| 94 | } | 106 | } |
| 95 | 107 | ||
| 96 | #define deactivate_mm(tsk,mm) do { } while (0) | 108 | #define deactivate_mm(tsk,mm) do { } while (0) |
