]> asedeno.scripts.mit.edu Git - linux.git/commit
iommu/iova: Extend cached node lookup condition
authorRobin Murphy <robin.murphy@arm.com>
Fri, 11 Nov 2016 18:35:46 +0000 (18:35 +0000)
committerJoerg Roedel <jroedel@suse.de>
Tue, 15 Nov 2016 11:39:52 +0000 (12:39 +0100)
commit62280cf2e8bb46d14b47b198720ab2d69b43faf7
tree7134cc1db3960d9f5912244d05fbbac90e37496a
parent5d1d43b0f6231cfffde61f8774283f170c040776
iommu/iova: Extend cached node lookup condition

When searching for a free IOVA range, we optimise the tree traversal
by starting from the cached32_node, instead of the last node, when
limit_pfn is equal to dma_32bit_pfn. However, if limit_pfn happens to
be smaller, then we'll go ahead and start from the top even though
dma_32bit_pfn is still a more suitable upper bound. Since this is
clearly a silly thing to do, adjust the lookup condition appropriately.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iova.c