aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/paca.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2017-03-21 23:36:58 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2017-04-01 06:12:20 -0400
commit957b778a166e32e242a33fdab693ffb256a19cbd (patch)
treee4ffce7347a62e55ac2cd99b3efdb2e62c7cf070 /arch/powerpc/kernel/paca.c
parentf6eedbba7a26fdaee9ea8121336dc86236c136c7 (diff)
powerpc/mm: Add addr_limit to mm_context and use it to derive max slice index
In the followup patch, we will increase the slice array size to handle 512TB range, but will limit the max addr to 128TB. Avoid doing unnecessary computation and avoid doing slice mask related operation above address limit. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/paca.c')
-rw-r--r--arch/powerpc/kernel/paca.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index e2cf745a4b94..a2c7a6456ee6 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -253,9 +253,10 @@ void copy_mm_to_paca(struct mm_struct *mm)
253 253
254 get_paca()->mm_ctx_id = context->id; 254 get_paca()->mm_ctx_id = context->id;
255#ifdef CONFIG_PPC_MM_SLICES 255#ifdef CONFIG_PPC_MM_SLICES
256 VM_BUG_ON(!mm->context.addr_limit);
256 get_paca()->mm_ctx_low_slices_psize = context->low_slices_psize; 257 get_paca()->mm_ctx_low_slices_psize = context->low_slices_psize;
257 memcpy(&get_paca()->mm_ctx_high_slices_psize, 258 memcpy(&get_paca()->mm_ctx_high_slices_psize,
258 &context->high_slices_psize, SLICE_ARRAY_SIZE); 259 &context->high_slices_psize, TASK_SLICE_ARRAY_SZ(mm));
259#else /* CONFIG_PPC_MM_SLICES */ 260#else /* CONFIG_PPC_MM_SLICES */
260 get_paca()->mm_ctx_user_psize = context->user_psize; 261 get_paca()->mm_ctx_user_psize = context->user_psize;
261 get_paca()->mm_ctx_sllp = context->sllp; 262 get_paca()->mm_ctx_sllp = context->sllp;