]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - lib/swiotlb.c
tracing/events: Fix swiotlb tracepoint creation
[karo-tx-linux.git] / lib / swiotlb.c
index 4e8686c7e5a4085753121337755bf522ccfe6300..55587060e893a8cc4050da40e95a3d036f17b812 100644 (file)
@@ -38,6 +38,9 @@
 #include <linux/bootmem.h>
 #include <linux/iommu-helper.h>
 
+#define CREATE_TRACE_POINTS
+#include <trace/events/swiotlb.h>
+
 #define OFFSET(val,align) ((unsigned long)     \
                           ( (val) & ( (align) - 1)))
 
@@ -726,6 +729,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) {