Merge tag 'dma-mapping-5.3' of git://git.infradead.org/users/hch/dma-mapping
[linux-2.6-block.git] / arch / arm / mm / dma-mapping.c
index 1fb5c0ca1ed8e8cf853732fb5b7a40d37ee2cd19..4789c60a86e34552411367282be7309f0d8f779a 100644 (file)
@@ -216,25 +216,7 @@ EXPORT_SYMBOL(arm_coherent_dma_ops);
 
 static int __dma_supported(struct device *dev, u64 mask, bool warn)
 {
-       unsigned long max_dma_pfn;
-
-       /*
-        * If the mask allows for more memory than we can address,
-        * and we actually have that much memory, then we must
-        * indicate that DMA to this device is not supported.
-        */
-       if (sizeof(mask) != sizeof(dma_addr_t) &&
-           mask > (dma_addr_t)~0 &&
-           dma_to_pfn(dev, ~0) < max_pfn - 1) {
-               if (warn) {
-                       dev_warn(dev, "Coherent DMA mask %#llx is larger than dma_addr_t allows\n",
-                                mask);
-                       dev_warn(dev, "Driver did not use or check the return value from dma_set_coherent_mask()?\n");
-               }
-               return 0;
-       }
-
-       max_dma_pfn = min(max_pfn, arm_dma_pfn_limit);
+       unsigned long max_dma_pfn = min(max_pfn, arm_dma_pfn_limit);
 
        /*
         * Translate the device's DMA mask to a PFN limit.  This