aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/iommu-helper.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/iommu-helper.h b/include/linux/iommu-helper.h
index c975caf75385..58f41107e4ae 100644
--- a/include/linux/iommu-helper.h
+++ b/include/linux/iommu-helper.h
@@ -1,3 +1,13 @@
1static inline unsigned long iommu_device_max_index(unsigned long size,
2 unsigned long offset,
3 u64 dma_mask)
4{
5 if (size + offset > dma_mask)
6 return dma_mask - offset + 1;
7 else
8 return size;
9}
10
1extern int iommu_is_span_boundary(unsigned int index, unsigned int nr, 11extern int iommu_is_span_boundary(unsigned int index, unsigned int nr,
2 unsigned long shift, 12 unsigned long shift,
3 unsigned long boundary_size); 13 unsigned long boundary_size);