summaryrefslogtreecommitdiff
path: root/arch/alpha
diff options
context:
space:
mode:
authorMichel Lespinasse <walken@google.com>2013-02-21 16:43:01 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 17:22:20 -0800
commit6d1c7ccae946f5c959f5c9236813d9c33ae48537 (patch)
tree302940bc3853727589cd061aa1c3f724b15c9231 /arch/alpha
parent182dcfd648aef0705fd04c42cbe507c09e00c25d (diff)
downloadkernel-common-6d1c7ccae946f5c959f5c9236813d9c33ae48537.tar.gz
kernel-common-6d1c7ccae946f5c959f5c9236813d9c33ae48537.tar.bz2
kernel-common-6d1c7ccae946f5c959f5c9236813d9c33ae48537.zip
mm: use vm_unmapped_area() on alpha architecture
Update the alpha 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@google.com> Acked-by: Rik van Riel <riel@redhat.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/kernel/osf_sys.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index dbc1760f418b..b9e37ad6fa19 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -1300,17 +1300,15 @@ static unsigned long
arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
unsigned long limit)
{
- struct vm_area_struct *vma = find_vma(current->mm, addr);
-
- while (1) {
- /* At this point: (!vma || addr < vma->vm_end). */
- if (limit - len < addr)
- return -ENOMEM;
- if (!vma || addr + len <= vma->vm_start)
- return addr;
- addr = vma->vm_end;
- vma = vma->vm_next;
- }
+ struct vm_unmapped_area_info info;
+
+ info.flags = 0;
+ info.length = len;
+ info.low_limit = addr;
+ info.high_limit = limit;
+ info.align_mask = 0;
+ info.align_offset = 0;
+ return vm_unmapped_area(&info);
}
unsigned long