powerpc/mm: Move copy_mm_to_paca to paca.c
We also update the function arg to struct mm_struct. Move this so that function finds the definition of struct mm_struct. No functional change in this patch. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
a4d3621503
commit
52b1e66587
@@ -245,3 +245,22 @@ void __init free_unused_pacas(void)
|
||||
|
||||
free_lppacas();
|
||||
}
|
||||
|
||||
void copy_mm_to_paca(struct mm_struct *mm)
|
||||
{
|
||||
#ifdef CONFIG_PPC_BOOK3S
|
||||
mm_context_t *context = &mm->context;
|
||||
|
||||
get_paca()->mm_ctx_id = context->id;
|
||||
#ifdef CONFIG_PPC_MM_SLICES
|
||||
get_paca()->mm_ctx_low_slices_psize = context->low_slices_psize;
|
||||
memcpy(&get_paca()->mm_ctx_high_slices_psize,
|
||||
&context->high_slices_psize, SLICE_ARRAY_SIZE);
|
||||
#else /* CONFIG_PPC_MM_SLICES */
|
||||
get_paca()->mm_ctx_user_psize = context->user_psize;
|
||||
get_paca()->mm_ctx_sllp = context->sllp;
|
||||
#endif
|
||||
#else /* CONFIG_PPC_BOOK3S */
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user