Commit ae17a63b authored by Glauber Costa's avatar Glauber Costa Committed by Ingo Molnar

x86: move ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY to dma-mapping.h

define it conditionally to i386.
Signed-off-by: default avatarGlauber Costa <gcosta@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent c786df08
...@@ -204,4 +204,18 @@ dma_cache_sync(struct device *dev, void *vaddr, size_t size, ...@@ -204,4 +204,18 @@ dma_cache_sync(struct device *dev, void *vaddr, size_t size,
{ {
flush_write_buffers(); flush_write_buffers();
} }
#ifdef CONFIG_X86_32
# define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
extern int
dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
dma_addr_t device_addr, size_t size, int flags);
extern void
dma_release_declared_memory(struct device *dev);
extern void *
dma_mark_declared_memory_occupied(struct device *dev,
dma_addr_t device_addr, size_t size);
#endif /* CONFIG_X86_32 */
#endif #endif
...@@ -20,16 +20,4 @@ dma_get_cache_alignment(void) ...@@ -20,16 +20,4 @@ dma_get_cache_alignment(void)
#define dma_is_consistent(d, h) (1) #define dma_is_consistent(d, h) (1)
#define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
extern int
dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
dma_addr_t device_addr, size_t size, int flags);
extern void
dma_release_declared_memory(struct device *dev);
extern void *
dma_mark_declared_memory_occupied(struct device *dev,
dma_addr_t device_addr, size_t size);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment