X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=lib%2Fswiotlb.c;h=e4399fa65ad6b921aa88ed2a881d27118dda2dbb;hb=794e96e8ecc1eeff56f4ede168fd0b8f4c5a00b9;hp=4e8686c7e5a4085753121337755bf522ccfe6300;hpb=bdeeab62a611f1f7cd48fd285ce568e8dcd0455a;p=karo-tx-linux.git diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 4e8686c7e5a4..e4399fa65ad6 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -38,6 +38,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include + #define OFFSET(val,align) ((unsigned long) \ ( (val) & ( (align) - 1))) @@ -502,6 +505,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); @@ -726,6 +730,8 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, if (dma_capable(dev, dev_addr, size) && !swiotlb_force) return dev_addr; + trace_swiotlb_bounced(dev, dev_addr, size, swiotlb_force); + /* Oh well, have to allocate and map a bounce buffer. */ map = map_single(dev, phys, size, dir); if (map == SWIOTLB_MAP_ERROR) {