parisc: fix braino in commit adding __space_to_prot
[pandora-kernel.git] / arch / parisc / include / asm / mmu_context.h
index 85856c7..354b2ac 100644 (file)
@@ -34,16 +34,21 @@ destroy_context(struct mm_struct *mm)
        mm->context = 0;
 }
 
-static inline void load_context(mm_context_t context)
+static inline unsigned long __space_to_prot(mm_context_t context)
 {
-       mtsp(context, 3);
 #if SPACEID_SHIFT == 0
-       mtctl(context << 1,8);
+       return context << 1;
 #else
-       mtctl(context >> (SPACEID_SHIFT - 1),8);
+       return context >> (SPACEID_SHIFT - 1);
 #endif
 }
 
+static inline void load_context(mm_context_t context)
+{
+       mtsp(context, 3);
+       mtctl(__space_to_prot(context), 8);
+}
+
 static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk)
 {