summaryrefslogtreecommitdiff
path: root/include/linux/iova.h
diff options
context:
space:
mode:
authorGanapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>2018-09-05 07:27:36 +0300
committerJoerg Roedel <jroedel@suse.de>2018-09-25 11:18:27 +0300
commitbee60e94a1e20ec0b8ffdafae270731d8fda4551 (patch)
tree4bccce9ad467acc31c8a127ff57d06947f8c72d7 /include/linux/iova.h
parent6bf4ca7fbc85d80446ac01c0d1d77db4d91a6d84 (diff)
downloadlinux-bee60e94a1e20ec0b8ffdafae270731d8fda4551.tar.xz
iommu/iova: Optimise attempts to allocate iova from 32bit address range
As an optimisation for PCI devices, there is always first attempt been made to allocate iova from SAC address range. This will lead to unnecessary attempts, when there are no free ranges available. Adding fix to track recently failed iova address size and allow further attempts, only if requested size is lesser than a failed size. The size is updated when any replenish happens. Reviewed-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.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 928442dda565..0b93bf96693e 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;
+ unsigned long max32_alloc_size; /* Size of last failed allocation */
struct iova anchor; /* rbtree lookup anchor */
struct iova_rcache rcaches[IOVA_RANGE_CACHE_MAX_SIZE]; /* IOVA range caches */