diff options
Diffstat (limited to 'lib/swiotlb.c')
| -rw-r--r-- | lib/swiotlb.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ | |||
| 38 | #include <linux/bootmem.h> | 38 | #include <linux/bootmem.h> |
| 39 | #include <linux/iommu-helper.h> | 39 | #include <linux/iommu-helper.h> |
| 40 | 40 | ||
| 41 | #define CREATE_TRACE_POINTS | ||
| 42 | #include <trace/events/swiotlb.h> | ||
| 43 | |||
| 41 | #define OFFSET(val,align) ((unsigned long) \ | 44 | #define OFFSET(val,align) ((unsigned long) \ |
| 42 | ( (val) & ( (align) - 1))) | 45 | ( (val) & ( (align) - 1))) |
| 43 | 46 | ||
| @@ -502,6 +505,7 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, | |||
| 502 | 505 | ||
| 503 | not_found: | 506 | not_found: |
| 504 | spin_unlock_irqrestore(&io_tlb_lock, flags); | 507 | spin_unlock_irqrestore(&io_tlb_lock, flags); |
| 508 | dev_warn(hwdev, "swiotlb buffer is full\n"); | ||
| 505 | return SWIOTLB_MAP_ERROR; | 509 | return SWIOTLB_MAP_ERROR; |
| 506 | found: | 510 | found: |
| 507 | spin_unlock_irqrestore(&io_tlb_lock, flags); | 511 | spin_unlock_irqrestore(&io_tlb_lock, flags); |
| @@ -726,6 +730,8 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, | |||
| 726 | if (dma_capable(dev, dev_addr, size) && !swiotlb_force) | 730 | if (dma_capable(dev, dev_addr, size) && !swiotlb_force) |
| 727 | return dev_addr; | 731 | return dev_addr; |
| 728 | 732 | ||
| 733 | trace_swiotlb_bounced(dev, dev_addr, size, swiotlb_force); | ||
| 734 | |||
| 729 | /* Oh well, have to allocate and map a bounce buffer. */ | 735 | /* Oh well, have to allocate and map a bounce buffer. */ |
| 730 | map = map_single(dev, phys, size, dir); | 736 | map = map_single(dev, phys, size, dir); |
| 731 | if (map == SWIOTLB_MAP_ERROR) { | 737 | if (map == SWIOTLB_MAP_ERROR) { |
