参照元

説明

引数

返り値

参考

実装

static inline void *
dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
		gfp_t gfp)
{
	struct dma_map_ops *ops = get_dma_ops(dev);
	void *memory;
	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
	if (dma_alloc_from_coherent(dev, size, dma_handle, &memory))
		return memory;
	if (!dev)
		dev = &x86_dma_fallback_dev;
	if (!is_device_dma_capable(dev))
		return NULL;
	if (!ops->alloc_coherent)
		return NULL;

	memory = ops->alloc_coherent(dev, size, dma_handle,
				     dma_alloc_coherent_gfp_flags(dev, gfp));
	debug_dma_alloc_coherent(dev, size, *dma_handle, memory);
	return memory;
}

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2014-09-13 (土) 08:26:41