]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/dma/swiotlb.c
Merge tag 'drm-next-2019-05-16' of git://anongit.freedesktop.org/drm/drm
[linux.git] / kernel / dma / swiotlb.c
index 53012db1e53c6915ee29b0bcd7e543def476232b..6f7619c1f8774985dfb4b669b6c83ff2186fdeaa 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;