Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / arch / powerpc / mm / mmu_context_64.c
index 714a84d..90a06ac 100644 (file)
@@ -10,7 +10,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -44,11 +43,16 @@ again:
                return err;
 
        if (index > MAX_CONTEXT) {
+               spin_lock(&mmu_context_lock);
                idr_remove(&mmu_context_idr, index);
+               spin_unlock(&mmu_context_lock);
                return -ENOMEM;
        }
 
        mm->context.id = index;
+       mm->context.user_psize = mmu_virtual_psize;
+       mm->context.sllp = SLB_VSID_USER |
+               mmu_psize_defs[mmu_virtual_psize].sllp;
 
        return 0;
 }