powerpc/mm: Add helpers for accessing hash translation related variables
We want to switch to allocating them runtime only when hash translation is enabled. Add helpers so that both book3s and nohash can be adapted to upcoming change easily. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
4f40b15f33
commit
60458fba46
@@ -267,12 +267,12 @@ void copy_mm_to_paca(struct mm_struct *mm)
|
||||
|
||||
get_paca()->mm_ctx_id = context->id;
|
||||
#ifdef CONFIG_PPC_MM_SLICES
|
||||
VM_BUG_ON(!mm->context.slb_addr_limit);
|
||||
get_paca()->mm_ctx_slb_addr_limit = mm->context.slb_addr_limit;
|
||||
memcpy(&get_paca()->mm_ctx_low_slices_psize,
|
||||
&context->low_slices_psize, sizeof(context->low_slices_psize));
|
||||
memcpy(&get_paca()->mm_ctx_high_slices_psize,
|
||||
&context->high_slices_psize, TASK_SLICE_ARRAY_SZ(mm));
|
||||
VM_BUG_ON(!mm_ctx_slb_addr_limit(context));
|
||||
get_paca()->mm_ctx_slb_addr_limit = mm_ctx_slb_addr_limit(context);
|
||||
memcpy(&get_paca()->mm_ctx_low_slices_psize, mm_ctx_low_slices(context),
|
||||
LOW_SLICE_ARRAY_SZ);
|
||||
memcpy(&get_paca()->mm_ctx_high_slices_psize, mm_ctx_high_slices(context),
|
||||
TASK_SLICE_ARRAY_SZ(context));
|
||||
#else /* CONFIG_PPC_MM_SLICES */
|
||||
get_paca()->mm_ctx_user_psize = context->user_psize;
|
||||
get_paca()->mm_ctx_sllp = context->sllp;
|
||||
|
Reference in New Issue
Block a user