swiotlb: print a warning when the swiotlb is full
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 25 Oct 2013 10:33:26 +0000 (10:33 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 25 Oct 2013 10:33:26 +0000 (10:33 +0000)
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Changes in v7:
- use dev_warn instead of pr_warn.

drivers/xen/swiotlb-xen.c
lib/swiotlb.c

index 4221cb52387d335e9d0301dafeaa049048bbbb0d..4d50058d9630506a20fa53d03fe2d59989c2069b 100644 (file)
@@ -542,6 +542,7 @@ xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
                                                                 sg->length,
                                                                 dir);
                        if (map == SWIOTLB_MAP_ERROR) {
+                               dev_warn(hwdev, "swiotlb buffer is full\n");
                                /* Don't panic here, we expect map_sg users
                                   to do proper error handling. */
                                xen_swiotlb_unmap_sg_attrs(hwdev, sgl, i, dir,
index 4e8686c7e5a4085753121337755bf522ccfe6300..cdc051eaf66754c4f900439730b9b1faa24431d9 100644 (file)
@@ -502,6 +502,7 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,
 
 not_found:
        spin_unlock_irqrestore(&io_tlb_lock, flags);
+       dev_warn(hwdev, "swiotlb buffer is full\n");
        return SWIOTLB_MAP_ERROR;
 found:
        spin_unlock_irqrestore(&io_tlb_lock, flags);