参照元†
- struct device *dev
- phys_addr_t phys_addr
- dma_addr_t device_addr
- size_t size
- int flags
返り値†
ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY 有効†
int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
dma_addr_t device_addr, size_t size, int flags)
{
struct dma_coherent_mem *mem;
int ret;
ret = dma_init_coherent_memory(phys_addr, device_addr, size, flags,
&mem);
if (ret == 0)
return 0;
if (dma_assign_coherent_memory(dev, mem) == 0)
return ret;
dma_release_coherent_memory(mem);
return 0;
}
EXPORT_SYMBOL(dma_declare_coherent_memory);
ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY 無効†
static inline int
dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
dma_addr_t device_addr, size_t size, int flags)
{
return 0;
}
コメント†