]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/xen/swiotlb-xen.c
tracing/events: Add bounce tracing to swiotbl
[karo-tx-linux.git] / drivers / xen / swiotlb-xen.c
index 1b2277c311d22e31fc276b09cb6bd1ce3b783e39..b31081007a810cfcaf81d47d8ea07eae41eb8a00 100644 (file)
@@ -42,6 +42,9 @@
 #include <xen/page.h>
 #include <xen/xen-ops.h>
 #include <xen/hvc-console.h>
+
+#define CREATE_TRACE_POINTS
+#include <trace/events/swiotlb.h>
 /*
  * Used to do a quick range check in swiotlb_tbl_unmap_single and
  * swiotlb_tbl_sync_single_*, to see if the memory was in fact allocated by this
@@ -358,6 +361,8 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,
        /*
         * Oh well, have to allocate and map a bounce buffer.
         */
+       trace_swiotlb_bounced(dev, dev_addr, size, swiotlb_force);
+
        map = swiotlb_tbl_map_single(dev, start_dma_addr, phys, size, dir);
        if (map == SWIOTLB_MAP_ERROR)
                return DMA_ERROR_CODE;