swiotlb: search the software IO TLB only if the device makes use of it
[linux-2.6-microblaze.git] / include / linux / device.h
index 5fd89c9..6fc808d 100644 (file)
@@ -628,6 +628,7 @@ struct device_physical_location {
  * @dma_io_tlb_mem: Software IO TLB allocator.  Not for driver use.
  * @dma_io_tlb_pools:  List of transient swiotlb memory pools.
  * @dma_io_tlb_lock:   Protects changes to the list of active pools.
+ * @dma_uses_io_tlb: %true if device has used the software IO TLB.
  * @archdata:  For arch-specific additions.
  * @of_node:   Associated device tree node.
  * @fwnode:    Associated device node supplied by platform firmware.
@@ -737,6 +738,7 @@ struct device {
 #ifdef CONFIG_SWIOTLB_DYNAMIC
        struct list_head dma_io_tlb_pools;
        spinlock_t dma_io_tlb_lock;
+       bool dma_uses_io_tlb;
 #endif
        /* arch specific additions */
        struct dev_archdata     archdata;