diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-08-15 02:33:55 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-08-16 21:01:58 -0400 |
commit | 9dfe5c53d0fcc08e9efc1e13bb6702fac74f4a12 (patch) | |
tree | df65e57c6e3748ae26fdedc49b7423d612ba0933 /arch/powerpc/mm | |
parent | 1ac9f1f71dea5944085b7b4954516794a9dab35a (diff) |
[POWERPC] Fix non HUGETLB_PAGE build warning
arch/powerpc/mm/mmu_context_64.c: In function 'init_new_context':
arch/powerpc/mm/mmu_context_64.c:31: warning: unused variable 'new_context'
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/mmu_context_64.c | 5 | ||||
-rw-r--r-- | arch/powerpc/mm/slice.c | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/mm/mmu_context_64.c b/arch/powerpc/mm/mmu_context_64.c index 7a78cdc0515a..901ea765f146 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,19 @@ again: | |||
50 | return -ENOMEM; | 49 | return -ENOMEM; |
51 | } | 50 | } |
52 | 51 | ||
53 | mm->context.id = index; | ||
54 | #ifdef CONFIG_PPC_MM_SLICES | 52 | #ifdef CONFIG_PPC_MM_SLICES |
55 | /* The old code would re-promote on fork, we don't do that | 53 | /* The old code would re-promote on fork, we don't do that |
56 | * when using slices as it could cause problem promoting slices | 54 | * when using slices as it could cause problem promoting slices |
57 | * that have been forced down to 4K | 55 | * that have been forced down to 4K |
58 | */ | 56 | */ |
59 | if (new_context) | 57 | if (mm->context.id == 0) |
60 | slice_set_user_psize(mm, mmu_virtual_psize); | 58 | slice_set_user_psize(mm, mmu_virtual_psize); |
61 | #else | 59 | #else |
62 | mm->context.user_psize = mmu_virtual_psize; | 60 | mm->context.user_psize = mmu_virtual_psize; |
63 | mm->context.sllp = SLB_VSID_USER | | 61 | mm->context.sllp = SLB_VSID_USER | |
64 | mmu_psize_defs[mmu_virtual_psize].sllp; | 62 | mmu_psize_defs[mmu_virtual_psize].sllp; |
65 | #endif | 63 | #endif |
64 | mm->context.id = index; | ||
66 | 65 | ||
67 | return 0; | 66 | return 0; |
68 | } | 67 | } |
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index d5fd3909d13a..319826ef1645 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c | |||
@@ -551,6 +551,7 @@ EXPORT_SYMBOL_GPL(get_slice_psize); | |||
551 | * | 551 | * |
552 | * This is also called in init_new_context() to change back the user | 552 | * This is also called in init_new_context() to change back the user |
553 | * psize from whatever the parent context had it set to | 553 | * psize from whatever the parent context had it set to |
554 | * N.B. This may be called before mm->context.id has been set. | ||
554 | * | 555 | * |
555 | * This function will only change the content of the {low,high)_slice_psize | 556 | * This function will only change the content of the {low,high)_slice_psize |
556 | * masks, it will not flush SLBs as this shall be handled lazily by the | 557 | * masks, it will not flush SLBs as this shall be handled lazily by the |