diff options
author | Nicholas Piggin <[email protected]> | 2017-11-10 04:27:38 +1100 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2017-11-13 23:35:06 +1100 |
commit | 35602f82d0c765f991420e319c8d3a596c921eb8 (patch) | |
tree | f8d5512981cebf04772e1a15030e3bae3599ee7e | |
parent | effc1b25088502fbd30305c79773de2d1f7470a6 (diff) |
powerpc/64s/hash: Allow MAP_FIXED allocations to cross 128TB boundary
While mapping hints with a length that cross 128TB are disallowed,
MAP_FIXED allocations that cross 128TB are allowed. These are failing
on hash (on radix they succeed). Add an additional case for fixed
mappings to expand the addr_limit when crossing 128TB.
Fixes: f4ea6dcb08ea ("powerpc/mm: Enable mappings above 128TB")
Cc: [email protected] # v4.12+
Signed-off-by: Nicholas Piggin <[email protected]>
Reviewed-by: Aneesh Kumar K.V <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
-rw-r--r-- | arch/powerpc/mm/slice.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index 3889201b560c..a4f93699194b 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c @@ -418,7 +418,7 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len, unsigned long high_limit; high_limit = DEFAULT_MAP_WINDOW; - if (addr >= high_limit) + if (addr >= high_limit || (fixed && (addr + len > high_limit))) high_limit = TASK_SIZE; if (len > high_limit) |