Context |
Check |
Description |
snowpatch_ozlabs/apply_patch |
fail
|
Failed to apply to any branch
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/merge (d20f726744a0312b4b6613333bda7da9bc52fb75)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/next (39352430aaa05fbe4ba710231c70b334513078f2)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch linus/master (16fc44d6387e260f4932e9248b985837324705d8)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/fixes (791f9e36599d94af5a76d3f74d04e16326761aae)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch linux-next (1fe5501ba1abf2b7e78295df73675423bd6899a0)
|
@@ -2,6 +2,7 @@
#ifndef __LINUX_SWIOTLB_H
#define __LINUX_SWIOTLB_H
+#include <linux/device.h>
#include <linux/dma-direction.h>
#include <linux/init.h>
#include <linux/types.h>
@@ -102,6 +103,16 @@ struct io_tlb_mem {
};
extern struct io_tlb_mem *io_tlb_default_mem;
+static inline struct io_tlb_mem *get_io_tlb_mem(struct device *dev)
+{
+#ifdef CONFIG_DMA_RESTRICTED_POOL
+ if (dev && dev->dma_io_tlb_mem)
+ return dev->dma_io_tlb_mem;
+#endif /* CONFIG_DMA_RESTRICTED_POOL */
+
+ return io_tlb_default_mem;
+}
+
static inline bool is_swiotlb_buffer(phys_addr_t paddr)
{
struct io_tlb_mem *mem = io_tlb_default_mem;
Add a new getter, get_io_tlb_mem, to help select the io_tlb_mem struct. The restricted DMA pool is preferred if available. Signed-off-by: Claire Chang <tientzu@chromium.org> --- include/linux/swiotlb.h | 11 +++++++++++ 1 file changed, 11 insertions(+)