[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>
This commit is contained in:
Родитель
1ac9f1f71d
Коммит
9dfe5c53d0
|
@ -28,7 +28,6 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
int err;
|
int err;
|
||||||
int new_context = (mm->context.id == 0);
|
|
||||||
|
|
||||||
again:
|
again:
|
||||||
if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL))
|
if (!idr_pre_get(&mmu_context_idr, GFP_KERNEL))
|
||||||
|
@ -50,19 +49,19 @@ again:
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
mm->context.id = index;
|
|
||||||
#ifdef CONFIG_PPC_MM_SLICES
|
#ifdef CONFIG_PPC_MM_SLICES
|
||||||
/* The old code would re-promote on fork, we don't do that
|
/* The old code would re-promote on fork, we don't do that
|
||||||
* when using slices as it could cause problem promoting slices
|
* when using slices as it could cause problem promoting slices
|
||||||
* that have been forced down to 4K
|
* that have been forced down to 4K
|
||||||
*/
|
*/
|
||||||
if (new_context)
|
if (mm->context.id == 0)
|
||||||
slice_set_user_psize(mm, mmu_virtual_psize);
|
slice_set_user_psize(mm, mmu_virtual_psize);
|
||||||
#else
|
#else
|
||||||
mm->context.user_psize = mmu_virtual_psize;
|
mm->context.user_psize = mmu_virtual_psize;
|
||||||
mm->context.sllp = SLB_VSID_USER |
|
mm->context.sllp = SLB_VSID_USER |
|
||||||
mmu_psize_defs[mmu_virtual_psize].sllp;
|
mmu_psize_defs[mmu_virtual_psize].sllp;
|
||||||
#endif
|
#endif
|
||||||
|
mm->context.id = index;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -551,6 +551,7 @@ EXPORT_SYMBOL_GPL(get_slice_psize);
|
||||||
*
|
*
|
||||||
* This is also called in init_new_context() to change back the user
|
* This is also called in init_new_context() to change back the user
|
||||||
* psize from whatever the parent context had it set to
|
* psize from whatever the parent context had it set to
|
||||||
|
* N.B. This may be called before mm->context.id has been set.
|
||||||
*
|
*
|
||||||
* This function will only change the content of the {low,high)_slice_psize
|
* This function will only change the content of the {low,high)_slice_psize
|
||||||
* masks, it will not flush SLBs as this shall be handled lazily by the
|
* masks, it will not flush SLBs as this shall be handled lazily by the
|
||||||
|
|
Загрузка…
Ссылка в новой задаче