aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/mmu_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc/mmu_context.h')
-rw-r--r--include/asm-ppc/mmu_context.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-ppc/mmu_context.h b/include/asm-ppc/mmu_context.h
index 9222fa6ca172..afe26ffc2e2d 100644
--- a/include/asm-ppc/mmu_context.h
+++ b/include/asm-ppc/mmu_context.h
@@ -63,7 +63,7 @@ static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
63#define LAST_CONTEXT 255 63#define LAST_CONTEXT 255
64#define FIRST_CONTEXT 1 64#define FIRST_CONTEXT 1
65 65
66#elif defined(CONFIG_E500) 66#elif defined(CONFIG_E200) || defined(CONFIG_E500)
67#define NO_CONTEXT 256 67#define NO_CONTEXT 256
68#define LAST_CONTEXT 255 68#define LAST_CONTEXT 255
69#define FIRST_CONTEXT 1 69#define FIRST_CONTEXT 1
@@ -149,6 +149,7 @@ static inline void get_mmu_context(struct mm_struct *mm)
149 */ 149 */
150static inline void destroy_context(struct mm_struct *mm) 150static inline void destroy_context(struct mm_struct *mm)
151{ 151{
152 preempt_disable();
152 if (mm->context != NO_CONTEXT) { 153 if (mm->context != NO_CONTEXT) {
153 clear_bit(mm->context, context_map); 154 clear_bit(mm->context, context_map);
154 mm->context = NO_CONTEXT; 155 mm->context = NO_CONTEXT;
@@ -156,6 +157,7 @@ static inline void destroy_context(struct mm_struct *mm)
156 atomic_inc(&nr_free_contexts); 157 atomic_inc(&nr_free_contexts);
157#endif 158#endif
158 } 159 }
160 preempt_enable();
159} 161}
160 162
161static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, 163static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,