Merge tag 'powerpc-5.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[sfrench/cifs-2.6.git] / arch / powerpc / kernel / dma-iommu.c
index 2f5a53874f6d4349580b58de3a396ea945c0a28b..e486d1d78de28842b8a35af69880bbb12ce86cf8 100644 (file)
@@ -122,18 +122,17 @@ int dma_iommu_dma_supported(struct device *dev, u64 mask)
 {
        struct iommu_table *tbl = get_iommu_table_base(dev);
 
-       if (!tbl) {
-               dev_info(dev, "Warning: IOMMU dma not supported: mask 0x%08llx"
-                       ", table unavailable\n", mask);
-               return 0;
-       }
-
        if (dev_is_pci(dev) && dma_iommu_bypass_supported(dev, mask)) {
                dev->archdata.iommu_bypass = true;
                dev_dbg(dev, "iommu: 64-bit OK, using fixed ops\n");
                return 1;
        }
 
+       if (!tbl) {
+               dev_err(dev, "Warning: IOMMU dma not supported: mask 0x%08llx, table unavailable\n", mask);
+               return 0;
+       }
+
        if (tbl->it_offset > (mask >> tbl->it_page_shift)) {
                dev_info(dev, "Warning: IOMMU offset too big for device mask\n");
                dev_info(dev, "mask: 0x%08llx, table offset: 0x%08lx\n",