Skip to content

Commit

Permalink
get_unmapped_area handles MAP_FIXED on sparc64
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed May 7, 2007
1 parent 869e510 commit ac35ee4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/sparc64/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ac35ee4

Please sign in to comment.