summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm/hugetlbpage.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-05-06 14:50:10 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 12:12:56 -0700
commitac35ee484df361e1aed89873a458900693effdbe (patch)
tree7a53ac8b5f64d930a0a83ea15b6213a2c225f742 /arch/sparc64/mm/hugetlbpage.c
parent869e5101728fe2f307f0a3c3cf599c184f81f0ee (diff)
downloadop-kernel-dev-ac35ee484df361e1aed89873a458900693effdbe.zip
op-kernel-dev-ac35ee484df361e1aed89873a458900693effdbe.tar.gz
get_unmapped_area handles MAP_FIXED on sparc64
Handle MAP_FIXED in hugetlb_get_unmapped_area on sparc64 by just using prepare_hugepage_range() Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: William Irwin <bill.irwin@oracle.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc64/mm/hugetlbpage.c')
-rw-r--r--arch/sparc64/mm/hugetlbpage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
index 00677b5..e224a94 100644
--- a/arch/sparc64/mm/hugetlbpage.c
+++ b/arch/sparc64/mm/hugetlbpage.c
@@ -175,6 +175,12 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
if (len > task_size)
return -ENOMEM;
+ if (flags & MAP_FIXED) {
+ if (prepare_hugepage_range(addr, len, pgoff))
+ return -EINVAL;
+ return addr;
+ }
+
if (addr) {
addr = ALIGN(addr, HPAGE_SIZE);
vma = find_vma(mm, addr);
OpenPOWER on IntegriCloud