参照元

説明

引数

返り値

参考

実装

ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY 有効: drivers/base/dma-mapping.c

/**
 * dmam_declare_coherent_memory - Managed dma_declare_coherent_memory()
 * @dev: Device to declare coherent memory for
 * @phys_addr: Physical address of coherent memory to be declared
 * @device_addr: Device address of coherent memory to be declared
 * @size: Size of coherent memory to be declared
 * @flags: Flags
 *
 * Managed dma_declare_coherent_memory().
 *
 * RETURNS:
 * 0 on success, -errno on failure.
 */
int dmam_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
                                 dma_addr_t device_addr, size_t size, int flags)
{
        void *res;
        int rc;

        res = devres_alloc(dmam_coherent_decl_release, 0, GFP_KERNEL);
        if (!res)
                return -ENOMEM;
        rc = dma_declare_coherent_memory(dev, phys_addr, device_addr, size,
                                         flags);
        if (rc == 0)
                devres_add(dev, res);
        else
                devres_free(res);
        return rc;
}
EXPORT_SYMBOL(dmam_declare_coherent_memory);

ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY 無効: include/linux/dma-mapping.h

static inline int dmam_declare_coherent_memory(struct device *dev,
                                phys_addr_t phys_addr, dma_addr_t device_addr,
                                size_t size, gfp_t gfp)
{
        return 0;
}

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-02-22 (月) 21:25:12