]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/mm/mmu_context_64.c
[SCSI] Merge up to linux-2.6 head
[linux-2.6-omap-h63xx.git] / arch / powerpc / mm / mmu_context_64.c
index 90a06ac02d5e5f35f44adf4366cc016b473463ee..7a78cdc0515a283cd13a6487b558adea435caf8b 100644 (file)
@@ -28,6 +28,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
 {
        int index;
        int err;
+       int new_context = (mm->context.id == 0);
 
 again:
        if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL))
@@ -50,9 +51,18 @@ again:
        }
 
        mm->context.id = index;
+#ifdef CONFIG_PPC_MM_SLICES
+       /* The old code would re-promote on fork, we don't do that
+        * when using slices as it could cause problem promoting slices
+        * that have been forced down to 4K
+        */
+       if (new_context)
+               slice_set_user_psize(mm, mmu_virtual_psize);
+#else
        mm->context.user_psize = mmu_virtual_psize;
        mm->context.sllp = SLB_VSID_USER |
                mmu_psize_defs[mmu_virtual_psize].sllp;
+#endif
 
        return 0;
 }