diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2017-03-29 17:21:53 +1100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-03-31 23:10:00 +1100 |
commit | e6f81a92015b2c1d12fad32b8456f99855da6e13 (patch) | |
tree | 377f39200568f1d4175ec438e1e8d1b62835b356 /arch/powerpc/mm/mmu_context_book3s64.c | |
parent | 85beb1c486df76a7a851a0e063785282c2608f37 (diff) |
powerpc/mm/hash: Support 68 bit VA
Inorder to support large effective address range (512TB), we want to
increase the virtual address bits to 68. But we do have platforms like
p4 and p5 that can only do 65 bit VA. We support those platforms by
limiting context bits on them to 16.
The protovsid -> vsid conversion is verified to work with both 65 and 68
bit va values. I also documented the restrictions in a table format as
part of code comments.
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 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/powerpc/mm/mmu_context_book3s64.c b/arch/powerpc/mm/mmu_context_book3s64.c index a10e972221c4..e5fde156e11d 100644 --- a/arch/powerpc/mm/mmu_context_book3s64.c +++ b/arch/powerpc/mm/mmu_context_book3s64.c @@ -59,7 +59,14 @@ again: int hash__alloc_context_id(void) { - return alloc_context_id(MIN_USER_CONTEXT, MAX_USER_CONTEXT); + unsigned long max; + + if (mmu_has_feature(MMU_FTR_68_BIT_VA)) + max = MAX_USER_CONTEXT; + else + max = MAX_USER_CONTEXT_65BIT_VA; + + return alloc_context_id(MIN_USER_CONTEXT, max); } EXPORT_SYMBOL_GPL(hash__alloc_context_id); |