Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ac35ee484df361e1aed89873a458900693effdbe
Commit:     ac35ee484df361e1aed89873a458900693effdbe
Parent:     869e5101728fe2f307f0a3c3cf599c184f81f0ee
Author:     Benjamin Herrenschmidt <[EMAIL PROTECTED]>
AuthorDate: Sun May 6 14:50:10 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon May 7 12:12:56 2007 -0700

    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 <[EMAIL PROTECTED]>
    Acked-by: William Irwin <[EMAIL PROTECTED]>
    Cc: "David S. Miller" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/sparc64/mm/hugetlbpage.c |    6 ++++++
 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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to