aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/hugetlbpage-radix.c
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-11-10 04:27:40 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2017-11-13 23:35:43 +1100
commit4722476bce283149986a3463f61009dec0e7f6a1 (patch)
tree87ce6b6610eea7d259ff119c2c63dd8937aa8702 /arch/powerpc/mm/hugetlbpage-radix.c
parentpowerpc/64s/radix: Fix 128TB-512TB virtual address boundary case allocation (diff)
downloadlinux-dev-4722476bce283149986a3463f61009dec0e7f6a1.tar.xz
linux-dev-4722476bce283149986a3463f61009dec0e7f6a1.zip
powerpc/64s: mm_context.addr_limit is only used on hash
Radix keeps no meaningful state in addr_limit, so remove it from radix code and rename to slb_addr_limit to make it clear it applies to hash only. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-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/hugetlbpage-radix.c')
-rw-r--r--arch/powerpc/mm/hugetlbpage-radix.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/powerpc/mm/hugetlbpage-radix.c b/arch/powerpc/mm/hugetlbpage-radix.c
index 0a3d71aae175..b54b581a2f7d 100644
--- a/arch/powerpc/mm/hugetlbpage-radix.c
+++ b/arch/powerpc/mm/hugetlbpage-radix.c
@@ -60,16 +60,10 @@ radix__hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
return -EINVAL;
if (len > high_limit)
return -ENOMEM;
+
if (fixed) {
if (addr > high_limit - len)
return -ENOMEM;
- }
-
- if (unlikely(addr > mm->context.addr_limit &&
- mm->context.addr_limit != TASK_SIZE))
- mm->context.addr_limit = TASK_SIZE;
-
- if (fixed) {
if (prepare_hugepage_range(file, addr, len))
return -EINVAL;
return addr;