diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-05-06 17:50:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:12:56 -0400 |
commit | 5a8130f2b186ac91190d1dcea875d66d08e6a1de (patch) | |
tree | 21966c95a546c49459211dcf36ca140537ddccda /arch/i386/mm | |
parent | 2fd3bebaad9da3b3b99c46a3389099424bf7ee35 (diff) |
get_unmapped_area handles MAP_FIXED on i386
Handle MAP_FIXED in i386 hugetlb_get_unmapped_area(), just call
prepare_hugepage_range.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: William Irwin <bill.irwin@oracle.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Adam Litke <agl@us.ibm.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/i386/mm')
-rw-r--r-- | arch/i386/mm/hugetlbpage.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c index 34728e4afe48..6272a4fd9e7c 100644 --- a/arch/i386/mm/hugetlbpage.c +++ b/arch/i386/mm/hugetlbpage.c | |||
@@ -367,6 +367,12 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
367 | if (len > TASK_SIZE) | 367 | if (len > TASK_SIZE) |
368 | return -ENOMEM; | 368 | return -ENOMEM; |
369 | 369 | ||
370 | if (flags & MAP_FIXED) { | ||
371 | if (prepare_hugepage_range(addr, len, pgoff)) | ||
372 | return -EINVAL; | ||
373 | return addr; | ||
374 | } | ||
375 | |||
370 | if (addr) { | 376 | if (addr) { |
371 | addr = ALIGN(addr, HPAGE_SIZE); | 377 | addr = ALIGN(addr, HPAGE_SIZE); |
372 | vma = find_vma(mm, addr); | 378 | vma = find_vma(mm, addr); |