Skip to content

Commit

Permalink
omap iommu: Exit iteration if no possibility of available area
Browse files Browse the repository at this point in the history
Searching avaialable spaces should be stopped as soon as it turns out
that there's no possibility with the rest of it.

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
  • Loading branch information
Hiroshi DOYU authored and Hiroshi DOYU committed May 14, 2010
1 parent fa460b8 commit e0a42e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/arm/plat-omap/iovmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da,
prev_end = 0;
list_for_each_entry(tmp, &obj->mmap, list) {

if ((prev_end < start) && (start + bytes < tmp->da_start))
if (prev_end >= start)
break;

if (start + bytes < tmp->da_start)
goto found;

if (flags & IOVMF_DA_ANON)
Expand Down

0 comments on commit e0a42e4

Please sign in to comment.