diff options
Diffstat (limited to 'arch/powerpc/mm/mmu_context_64.c')
-rw-r--r-- | arch/powerpc/mm/mmu_context_64.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/powerpc/mm/mmu_context_64.c b/arch/powerpc/mm/mmu_context_64.c index 7a78cdc0515a..1db38ba1f544 100644 --- a/arch/powerpc/mm/mmu_context_64.c +++ b/arch/powerpc/mm/mmu_context_64.c | |||
@@ -28,7 +28,6 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm) | |||
28 | { | 28 | { |
29 | int index; | 29 | int index; |
30 | int err; | 30 | int err; |
31 | int new_context = (mm->context.id == 0); | ||
32 | 31 | ||
33 | again: | 32 | again: |
34 | if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL)) | 33 | if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL)) |
@@ -50,19 +49,13 @@ again: | |||
50 | return -ENOMEM; | 49 | return -ENOMEM; |
51 | } | 50 | } |
52 | 51 | ||
53 | mm->context.id = index; | ||
54 | #ifdef CONFIG_PPC_MM_SLICES | ||
55 | /* The old code would re-promote on fork, we don't do that | 52 | /* The old code would re-promote on fork, we don't do that |
56 | * when using slices as it could cause problem promoting slices | 53 | * when using slices as it could cause problem promoting slices |
57 | * that have been forced down to 4K | 54 | * that have been forced down to 4K |
58 | */ | 55 | */ |
59 | if (new_context) | 56 | if (slice_mm_new_context(mm)) |
60 | slice_set_user_psize(mm, mmu_virtual_psize); | 57 | slice_set_user_psize(mm, mmu_virtual_psize); |
61 | #else | 58 | mm->context.id = index; |
62 | mm->context.user_psize = mmu_virtual_psize; | ||
63 | mm->context.sllp = SLB_VSID_USER | | ||
64 | mmu_psize_defs[mmu_virtual_psize].sllp; | ||
65 | #endif | ||
66 | 59 | ||
67 | return 0; | 60 | return 0; |
68 | } | 61 | } |