aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel
diff options
context:
space:
mode:
authorMichel Lespinasse <walken@google.com>2013-02-21 19:43:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 20:22:20 -0500
commit6d1c7ccae946f5c959f5c9236813d9c33ae48537 (patch)
tree302940bc3853727589cd061aa1c3f724b15c9231 /arch/alpha/kernel
parent182dcfd648aef0705fd04c42cbe507c09e00c25d (diff)
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/kernel')
-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
1300arch_get_unmapped_area_1(unsigned long addr, unsigned long len, 1300arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
1301 unsigned long limit) 1301 unsigned long limit)
1302{ 1302{
1303 struct vm_area_struct *vma = find_vma(current->mm, addr); 1303 struct vm_unmapped_area_info info;
1304 1304
1305 while (1) { 1305 info.flags = 0;
1306 /* At this point: (!vma || addr < vma->vm_end). */ 1306 info.length = len;
1307 if (limit - len < addr) 1307 info.low_limit = addr;
1308 return -ENOMEM; 1308 info.high_limit = limit;
1309 if (!vma || addr + len <= vma->vm_start) 1309 info.align_mask = 0;
1310 return addr; 1310 info.align_offset = 0;
1311 addr = vma->vm_end; 1311 return vm_unmapped_area(&info);
1312 vma = vma->vm_next;
1313 }
1314} 1312}
1315 1313
1316unsigned long 1314unsigned long