diff --git a/[refs] b/[refs] index 513e2453a44c..2bbd1dd74125 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6e03f99803195e5aaf7f247db31b0d11857ccc35 +refs/heads/master: eecfffc154ffbfe70686a9905c090b488778c28e diff --git a/trunk/include/linux/iommu-helper.h b/trunk/include/linux/iommu-helper.h index c975caf75385..58f41107e4ae 100644 --- a/trunk/include/linux/iommu-helper.h +++ b/trunk/include/linux/iommu-helper.h @@ -1,3 +1,13 @@ +static inline unsigned long iommu_device_max_index(unsigned long size, + unsigned long offset, + u64 dma_mask) +{ + if (size + offset > dma_mask) + return dma_mask - offset + 1; + else + return size; +} + extern int iommu_is_span_boundary(unsigned int index, unsigned int nr, unsigned long shift, unsigned long boundary_size);