dma-debug: teach add_dma_entry() about DMA_ATTR_SKIP_CPU_SYNC
Mapping something twice should be possible as long as, DMA_ATTR_SKIP_CPU_SYNC is passed to the strictly speaking second relevant mapping operation (that attempts to map the same thing). So, don't issue a warning if the specified condition is met in add_dma_entry(). Signed-off-by: Hamza Mahfooz <someguy@effective-light.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
committed by
Christoph Hellwig
parent
293d92cbbd
commit
c2bbf9d1e9
+16
-8
@@ -11,26 +11,30 @@
|
||||
#ifdef CONFIG_DMA_API_DEBUG
|
||||
extern void debug_dma_map_page(struct device *dev, struct page *page,
|
||||
size_t offset, size_t size,
|
||||
int direction, dma_addr_t dma_addr);
|
||||
int direction, dma_addr_t dma_addr,
|
||||
unsigned long attrs);
|
||||
|
||||
extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr,
|
||||
size_t size, int direction);
|
||||
|
||||
extern void debug_dma_map_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nents, int mapped_ents, int direction);
|
||||
int nents, int mapped_ents, int direction,
|
||||
unsigned long attrs);
|
||||
|
||||
extern void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist,
|
||||
int nelems, int dir);
|
||||
|
||||
extern void debug_dma_alloc_coherent(struct device *dev, size_t size,
|
||||
dma_addr_t dma_addr, void *virt);
|
||||
dma_addr_t dma_addr, void *virt,
|
||||
unsigned long attrs);
|
||||
|
||||
extern void debug_dma_free_coherent(struct device *dev, size_t size,
|
||||
void *virt, dma_addr_t addr);
|
||||
|
||||
extern void debug_dma_map_resource(struct device *dev, phys_addr_t addr,
|
||||
size_t size, int direction,
|
||||
dma_addr_t dma_addr);
|
||||
dma_addr_t dma_addr,
|
||||
unsigned long attrs);
|
||||
|
||||
extern void debug_dma_unmap_resource(struct device *dev, dma_addr_t dma_addr,
|
||||
size_t size, int direction);
|
||||
@@ -53,7 +57,8 @@ extern void debug_dma_sync_sg_for_device(struct device *dev,
|
||||
#else /* CONFIG_DMA_API_DEBUG */
|
||||
static inline void debug_dma_map_page(struct device *dev, struct page *page,
|
||||
size_t offset, size_t size,
|
||||
int direction, dma_addr_t dma_addr)
|
||||
int direction, dma_addr_t dma_addr,
|
||||
unsigned long attrs)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -63,7 +68,8 @@ static inline void debug_dma_unmap_page(struct device *dev, dma_addr_t addr,
|
||||
}
|
||||
|
||||
static inline void debug_dma_map_sg(struct device *dev, struct scatterlist *sg,
|
||||
int nents, int mapped_ents, int direction)
|
||||
int nents, int mapped_ents, int direction,
|
||||
unsigned long attrs)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -74,7 +80,8 @@ static inline void debug_dma_unmap_sg(struct device *dev,
|
||||
}
|
||||
|
||||
static inline void debug_dma_alloc_coherent(struct device *dev, size_t size,
|
||||
dma_addr_t dma_addr, void *virt)
|
||||
dma_addr_t dma_addr, void *virt,
|
||||
unsigned long attrs)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -85,7 +92,8 @@ static inline void debug_dma_free_coherent(struct device *dev, size_t size,
|
||||
|
||||
static inline void debug_dma_map_resource(struct device *dev, phys_addr_t addr,
|
||||
size_t size, int direction,
|
||||
dma_addr_t dma_addr)
|
||||
dma_addr_t dma_addr,
|
||||
unsigned long attrs)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user