forked from luck/tmp_suning_uos_patched
dma-mapping: move more functions to dma-map-ops.h
Due to a mismerge a bunch of prototypes that should have moved to dma-map-ops.h are still in dma-mapping.h, fix that up. Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
0eb3b4ab76
commit
695cebe58d
|
@ -203,6 +203,29 @@ static inline int dma_mmap_from_global_coherent(struct vm_area_struct *vma,
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_DMA_DECLARE_COHERENT */
|
#endif /* CONFIG_DMA_DECLARE_COHERENT */
|
||||||
|
|
||||||
|
int dma_common_get_sgtable(struct device *dev, struct sg_table *sgt,
|
||||||
|
void *cpu_addr, dma_addr_t dma_addr, size_t size,
|
||||||
|
unsigned long attrs);
|
||||||
|
int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
|
||||||
|
void *cpu_addr, dma_addr_t dma_addr, size_t size,
|
||||||
|
unsigned long attrs);
|
||||||
|
struct page *dma_common_alloc_pages(struct device *dev, size_t size,
|
||||||
|
dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp);
|
||||||
|
void dma_common_free_pages(struct device *dev, size_t size, struct page *vaddr,
|
||||||
|
dma_addr_t dma_handle, enum dma_data_direction dir);
|
||||||
|
|
||||||
|
struct page **dma_common_find_pages(void *cpu_addr);
|
||||||
|
void *dma_common_contiguous_remap(struct page *page, size_t size, pgprot_t prot,
|
||||||
|
const void *caller);
|
||||||
|
void *dma_common_pages_remap(struct page **pages, size_t size, pgprot_t prot,
|
||||||
|
const void *caller);
|
||||||
|
void dma_common_free_remap(void *cpu_addr, size_t size);
|
||||||
|
|
||||||
|
struct page *dma_alloc_from_pool(struct device *dev, size_t size,
|
||||||
|
void **cpu_addr, gfp_t flags,
|
||||||
|
bool (*phys_addr_ok)(struct device *, phys_addr_t, size_t));
|
||||||
|
bool dma_free_from_pool(struct device *dev, void *start, size_t size);
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_HAS_DMA_COHERENCE_H
|
#ifdef CONFIG_ARCH_HAS_DMA_COHERENCE_H
|
||||||
#include <asm/dma-coherence.h>
|
#include <asm/dma-coherence.h>
|
||||||
#elif defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \
|
#elif defined(CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE) || \
|
||||||
|
|
|
@ -389,30 +389,6 @@ static inline void dma_sync_sgtable_for_device(struct device *dev,
|
||||||
#define dma_get_sgtable(d, t, v, h, s) dma_get_sgtable_attrs(d, t, v, h, s, 0)
|
#define dma_get_sgtable(d, t, v, h, s) dma_get_sgtable_attrs(d, t, v, h, s, 0)
|
||||||
#define dma_mmap_coherent(d, v, c, h, s) dma_mmap_attrs(d, v, c, h, s, 0)
|
#define dma_mmap_coherent(d, v, c, h, s) dma_mmap_attrs(d, v, c, h, s, 0)
|
||||||
|
|
||||||
extern int dma_common_mmap(struct device *dev, struct vm_area_struct *vma,
|
|
||||||
void *cpu_addr, dma_addr_t dma_addr, size_t size,
|
|
||||||
unsigned long attrs);
|
|
||||||
struct page *dma_common_alloc_pages(struct device *dev, size_t size,
|
|
||||||
dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp);
|
|
||||||
void dma_common_free_pages(struct device *dev, size_t size, struct page *vaddr,
|
|
||||||
dma_addr_t dma_handle, enum dma_data_direction dir);
|
|
||||||
struct page **dma_common_find_pages(void *cpu_addr);
|
|
||||||
void *dma_common_contiguous_remap(struct page *page, size_t size,
|
|
||||||
pgprot_t prot, const void *caller);
|
|
||||||
|
|
||||||
void *dma_common_pages_remap(struct page **pages, size_t size,
|
|
||||||
pgprot_t prot, const void *caller);
|
|
||||||
void dma_common_free_remap(void *cpu_addr, size_t size);
|
|
||||||
|
|
||||||
struct page *dma_alloc_from_pool(struct device *dev, size_t size,
|
|
||||||
void **cpu_addr, gfp_t flags,
|
|
||||||
bool (*phys_addr_ok)(struct device *, phys_addr_t, size_t));
|
|
||||||
bool dma_free_from_pool(struct device *dev, void *start, size_t size);
|
|
||||||
|
|
||||||
int
|
|
||||||
dma_common_get_sgtable(struct device *dev, struct sg_table *sgt, void *cpu_addr,
|
|
||||||
dma_addr_t dma_addr, size_t size, unsigned long attrs);
|
|
||||||
|
|
||||||
static inline void *dma_alloc_coherent(struct device *dev, size_t size,
|
static inline void *dma_alloc_coherent(struct device *dev, size_t size,
|
||||||
dma_addr_t *dma_handle, gfp_t gfp)
|
dma_addr_t *dma_handle, gfp_t gfp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014 The Linux Foundation
|
* Copyright (c) 2014 The Linux Foundation
|
||||||
*/
|
*/
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-map-ops.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/vmalloc.h>
|
#include <linux/vmalloc.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user