aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup-common.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/setup-common.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/setup-common.c')
-rw-r--r--arch/powerpc/kernel/setup-common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 4697da895133..a79db6b63466 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -920,6 +920,15 @@ void __init setup_arch(char **cmdline_p)
920 init_mm.end_code = (unsigned long) _etext; 920 init_mm.end_code = (unsigned long) _etext;
921 init_mm.end_data = (unsigned long) _edata; 921 init_mm.end_data = (unsigned long) _edata;
922 init_mm.brk = klimit; 922 init_mm.brk = klimit;
923
924#ifdef CONFIG_PPC_MM_SLICES
925#ifdef CONFIG_PPC64
926 init_mm.context.addr_limit = TASK_SIZE_USER64;
927#else
928#error "context.addr_limit not initialized."
929#endif
930#endif
931
923#ifdef CONFIG_PPC_64K_PAGES 932#ifdef CONFIG_PPC_64K_PAGES
924 init_mm.context.pte_frag = NULL; 933 init_mm.context.pte_frag = NULL;
925#endif 934#endif