Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[linux-2.6-microblaze.git] / kernel / dma / swiotlb.c
index 53012db..6f7619c 100644 (file)
@@ -452,6 +452,7 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,
        unsigned long mask;
        unsigned long offset_slots;
        unsigned long max_slots;
+       unsigned long tmp_io_tlb_used;
 
        if (no_iotlb_memory)
                panic("Can not allocate SWIOTLB buffer earlier and can't now provide you with the DMA bounce buffer");
@@ -538,9 +539,12 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,
        } while (index != wrap);
 
 not_found:
+       tmp_io_tlb_used = io_tlb_used;
+
        spin_unlock_irqrestore(&io_tlb_lock, flags);
        if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit())
-               dev_warn(hwdev, "swiotlb buffer is full (sz: %zd bytes)\n", size);
+               dev_warn(hwdev, "swiotlb buffer is full (sz: %zd bytes), total %lu (slots), used %lu (slots)\n",
+                        size, io_tlb_nslabs, tmp_io_tlb_used);
        return DMA_MAPPING_ERROR;
 found:
        io_tlb_used += nslots;