summaryrefslogtreecommitdiffstats
path: root/include/linux/iova.h
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2017-09-21 16:52:46 +0100
committerJoerg Roedel <jroedel@suse.de>2017-09-27 17:09:57 +0200
commitbb68b2fbfbd643d4407541f9c7a16a2c9b3a57c7 (patch)
tree5661f027cb017af913c04f8f4d3f1178c18a7264 /include/linux/iova.h
parentaa3ac9469c1850ed00741955b975c3a19029763a (diff)
downloadlinux-0-day-bb68b2fbfbd643d4407541f9c7a16a2c9b3a57c7.tar.gz
linux-0-day-bb68b2fbfbd643d4407541f9c7a16a2c9b3a57c7.tar.xz
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>
Diffstat (limited to 'include/linux/iova.h')
-rw-r--r--include/linux/iova.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/iova.h b/include/linux/iova.h
index 953cfd20f1520..c696ee81054ed 100644
--- a/include/linux/iova.h
+++ b/include/linux/iova.h
@@ -75,6 +75,7 @@ struct iova_domain {
unsigned long granule; /* pfn granularity for this domain */
unsigned long start_pfn; /* Lower limit for this domain */
unsigned long dma_32bit_pfn;
+ struct iova anchor; /* rbtree lookup anchor */
struct iova_rcache rcaches[IOVA_RANGE_CACHE_MAX_SIZE]; /* IOVA range caches */
iova_flush_cb flush_cb; /* Call-Back function to flush IOMMU