The patch titled Subject: mm: use vm_unmapped_area() on sparc32 architecture has been added to the -mm tree. Its filename is mm-use-vm_unmapped_area-on-sparc32-architecture.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Michel Lespinasse <walken@xxxxxxxxxx> Subject: mm: use vm_unmapped_area() on sparc32 architecture Update the sparc32 arch_get_unmapped_area function to make use of vm_unmapped_area() instead of implementing a brute force search. Signed-off-by: Michel Lespinasse <walken@xxxxxxxxxx> Reviewed-by: Rik van Riel <riel@xxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Russell King <linux@xxxxxxxxxxxxxxxx> Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Cc: Paul Mundt <lethal@xxxxxxxxxxxx> Acked-by: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: Chris Metcalf <cmetcalf@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/sparc/kernel/sys_sparc_32.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff -puN arch/sparc/kernel/sys_sparc_32.c~mm-use-vm_unmapped_area-on-sparc32-architecture arch/sparc/kernel/sys_sparc_32.c --- a/arch/sparc/kernel/sys_sparc_32.c~mm-use-vm_unmapped_area-on-sparc32-architecture +++ a/arch/sparc/kernel/sys_sparc_32.c @@ -39,6 +39,7 @@ asmlinkage unsigned long sys_getpagesize unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { struct vm_area_struct * vmm; + struct vm_unmapped_area_info info; if (flags & MAP_FIXED) { /* We do not accept a shared mapping if it would violate @@ -56,21 +57,14 @@ unsigned long arch_get_unmapped_area(str if (!addr) addr = TASK_UNMAPPED_BASE; - if (flags & MAP_SHARED) - addr = COLOUR_ALIGN(addr); - else - addr = PAGE_ALIGN(addr); - - for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) { - /* At this point: (!vmm || addr < vmm->vm_end). */ - if (TASK_SIZE - PAGE_SIZE - len < addr) - return -ENOMEM; - if (!vmm || addr + len <= vmm->vm_start) - return addr; - addr = vmm->vm_end; - if (flags & MAP_SHARED) - addr = COLOUR_ALIGN(addr); - } + info.flags = 0; + info.length = len; + info.low_limit = addr; + info.high_limit = TASK_SIZE; + info.align_mask = (flags & MAP_SHARED) ? + (PAGE_MASK & (SHMLBA - 1)) : 0; + info.align_offset = pgoff << PAGE_SHIFT; + return vm_unmapped_area(&info); } /* _ Patches currently in -mm which might be from walken@xxxxxxxxxx are linux-next.patch mm-add-anon_vma_lock-to-validate_mm.patch mm-augment-vma-rbtree-with-rb_subtree_gap.patch mm-check-rb_subtree_gap-correctness.patch mm-check-rb_subtree_gap-correctness-fix.patch mm-rearrange-vm_area_struct-for-fewer-cache-misses.patch mm-rearrange-vm_area_struct-for-fewer-cache-misses-checkpatch-fixes.patch mm-vm_unmapped_area-lookup-function.patch mm-vm_unmapped_area-lookup-function-checkpatch-fixes.patch mm-use-vm_unmapped_area-on-x86_64-architecture.patch mm-fix-cache-coloring-on-x86_64-architecture.patch mm-use-vm_unmapped_area-in-hugetlbfs.patch mm-use-vm_unmapped_area-in-hugetlbfs-on-i386-architecture.patch mm-use-vm_unmapped_area-on-mips-architecture.patch mm-use-vm_unmapped_area-on-mips-architecture-fix.patch mm-use-vm_unmapped_area-on-arm-architecture.patch mm-use-vm_unmapped_area-on-arm-architecture-fix.patch mm-use-vm_unmapped_area-on-sh-architecture.patch mm-use-vm_unmapped_area-on-sh-architecture-fix.patch mm-use-vm_unmapped_area-on-sparc64-architecture.patch mm-use-vm_unmapped_area-on-sparc64-architecture-fix.patch mm-use-vm_unmapped_area-in-hugetlbfs-on-sparc64-architecture.patch mm-use-vm_unmapped_area-on-sparc32-architecture.patch mm-use-vm_unmapped_area-in-hugetlbfs-on-tile-architecture.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html