]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/dma/swiotlb.c
swiotlb: Introduce swiotlb_max_mapping_size()
[linux.git] / kernel / dma / swiotlb.c
index 1fb6fd68b9c7e80c969072642a4064f4e9608008..9cb21259cb0b3379b2ecfd53e73a5cf7ba4b1c2d 100644 (file)
@@ -662,3 +662,8 @@ swiotlb_dma_supported(struct device *hwdev, u64 mask)
 {
        return __phys_to_dma(hwdev, io_tlb_end - 1) <= mask;
 }
+
+size_t swiotlb_max_mapping_size(struct device *dev)
+{
+       return ((size_t)1 << IO_TLB_SHIFT) * IO_TLB_SEGSIZE;
+}