diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2017-03-22 09:06:58 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-04-01 21:12:20 +1100 |
commit | 957b778a166e32e242a33fdab693ffb256a19cbd (patch) | |
tree | e4ffce7347a62e55ac2cd99b3efdb2e62c7cf070 /arch/powerpc/mm/mmu_context_book3s64.c | |
parent | f6eedbba7a26fdaee9ea8121336dc86236c136c7 (diff) | |
download | linux-957b778a166e32e242a33fdab693ffb256a19cbd.tar.bz2 |
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/mm/mmu_context_book3s64.c')
-rw-r--r-- | arch/powerpc/mm/mmu_context_book3s64.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/mm/mmu_context_book3s64.c b/arch/powerpc/mm/mmu_context_book3s64.c index e5fde156e11d..fd0bc6db2dcd 100644 --- a/arch/powerpc/mm/mmu_context_book3s64.c +++ b/arch/powerpc/mm/mmu_context_book3s64.c @@ -79,6 +79,13 @@ static int hash__init_new_context(struct mm_struct *mm) return index; /* + * We do switch_slb() early in fork, even before we setup the + * mm->context.addr_limit. Default to max task size so that we copy the + * default values to paca which will help us to handle slb miss early. + */ + mm->context.addr_limit = TASK_SIZE_USER64; + + /* * The old code would re-promote on fork, we don't do that when using * slices as it could cause problem promoting slices that have been * forced down to 4K. |