|
@@ -38,6 +38,8 @@
|
|
#include <linux/bootmem.h>
|
|
#include <linux/bootmem.h>
|
|
#include <linux/iommu-helper.h>
|
|
#include <linux/iommu-helper.h>
|
|
|
|
|
|
|
|
+#include <trace/events/swiotlb.h>
|
|
|
|
+
|
|
#define OFFSET(val,align) ((unsigned long) \
|
|
#define OFFSET(val,align) ((unsigned long) \
|
|
( (val) & ( (align) - 1)))
|
|
( (val) & ( (align) - 1)))
|
|
|
|
|
|
@@ -726,6 +728,8 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
|
|
if (dma_capable(dev, dev_addr, size) && !swiotlb_force)
|
|
if (dma_capable(dev, dev_addr, size) && !swiotlb_force)
|
|
return dev_addr;
|
|
return dev_addr;
|
|
|
|
|
|
|
|
+ trace_swiotlb_bounced(dev, dev_addr, size, swiotlb_force);
|
|
|
|
+
|
|
/* Oh well, have to allocate and map a bounce buffer. */
|
|
/* Oh well, have to allocate and map a bounce buffer. */
|
|
map = map_single(dev, phys, size, dir);
|
|
map = map_single(dev, phys, size, dir);
|
|
if (map == SWIOTLB_MAP_ERROR) {
|
|
if (map == SWIOTLB_MAP_ERROR) {
|