参照元

説明

引数

返り値

参考

実装

CONFIG_DMA_CMA 有効: drivers/base/dma-contiguous.c

/**
 * dma_alloc_from_contiguous() - allocate pages from contiguous area
 * @dev:   Pointer to device for which the allocation is performed.
 * @count: Requested number of pages.
 * @align: Requested alignment of pages (in PAGE_SIZE order).
 *
 * This function allocates memory buffer for specified device. It uses
 * device specific contiguous memory area if available or the default
 * global one. Requires architecture specific dev_get_cma_area() helper
 * function.
 */
struct page *dma_alloc_from_contiguous(struct device *dev, size_t count,
                                       unsigned int align)
{
        if (align > CONFIG_CMA_ALIGNMENT)
                align = CONFIG_CMA_ALIGNMENT;
        return cma_alloc(dev_get_cma_area(dev), count, align);
}

CONFIG_DMA_CMA 無効: include/linux/dma-contiguous.h

static inline
struct page *dma_alloc_from_contiguous(struct device *dev, size_t count,
                                       unsigned int order)
{
        return NULL;
}

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-09-19 (火) 09:40:05