iommu/iova: Add rbtree anchor node
authorRobin Murphy <robin.murphy@arm.com>
Thu, 21 Sep 2017 15:52:46 +0000 (16:52 +0100)
committerJoerg Roedel <jroedel@suse.de>
Wed, 27 Sep 2017 15:09:57 +0000 (17:09 +0200)
commitbb68b2fbfbd643d4407541f9c7a16a2c9b3a57c7
tree5661f027cb017af913c04f8f4d3f1178c18a7264
parentaa3ac9469c1850ed00741955b975c3a19029763a
iommu/iova: Add rbtree anchor node

Add a permanent dummy IOVA reservation to the rbtree, such that we can
always access the top of the address space instantly. The immediate
benefit is that we remove the overhead of the rb_last() traversal when
not using the cached node, but it also paves the way for further
simplifications.

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