From: Nicholas Piggin <npiggin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>,
Michael Ellerman <mpe@ellerman.id.au>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>,
Florian Weimer <fweimer@redhat.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [PATCH v2 3/5] powerpc/64s/hash: Allow MAP_FIXED allocations to cross 128TB boundary
Date: Fri, 10 Nov 2017 04:27:38 +1100 [thread overview]
Message-ID: <20171109172740.19681-4-npiggin@gmail.com> (raw)
In-Reply-To: <20171109172740.19681-1-npiggin@gmail.com>
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.
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Fixes: f4ea6dcb08 ("powerpc/mm: Enable mappings above 128TB")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/mm/slice.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.15.0
next prev parent reply other threads:[~2017-11-09 17:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 17:27 [PATCH v2 0/5] powerpc VA allocator fixes for 512TB support Nicholas Piggin
2017-11-09 17:27 ` [PATCH v2 1/5] powerpc/64s/hash: Fix 128TB-512TB virtual address boundary case allocation Nicholas Piggin
2017-11-13 4:59 ` Aneesh Kumar K.V
2017-11-13 7:36 ` Nicholas Piggin
2017-11-14 11:12 ` [v2, " Michael Ellerman
2017-11-09 17:27 ` [PATCH v2 2/5] powerpc/64s/hash: Fix fork() with 512TB process address space Nicholas Piggin
2017-11-13 4:59 ` Aneesh Kumar K.V
2017-11-09 17:27 ` Nicholas Piggin [this message]
2017-11-13 4:59 ` [PATCH v2 3/5] powerpc/64s/hash: Allow MAP_FIXED allocations to cross 128TB boundary Aneesh Kumar K.V
2017-11-09 17:27 ` [PATCH v2 4/5] powerpc/64s/radix: Fix 128TB-512TB virtual address boundary case allocation Nicholas Piggin
2017-11-13 5:01 ` Aneesh Kumar K.V
2017-11-09 17:27 ` [PATCH v2 5/5] powerpc/64s: mm_context.addr_limit is only used on hash Nicholas Piggin
2017-11-13 5:01 ` Aneesh Kumar K.V
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171109172740.19681-4-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=fweimer@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.