参照元

説明

引数

返り値

参考

実装

/*
 * Make physical memory consistent for a single streaming mode DMA translation
 * after a transfer.
 *
 * If you perform a swiotlb_map_page() but wish to interrogate the buffer
 * using the cpu, yet do not wish to teardown the dma mapping, you must
 * call this function before doing so.  At the next point you give the dma
 * address back to the card, you must first perform a
 * swiotlb_dma_sync_for_device, and then the device again owns the buffer
 */
static void
swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr,
                    size_t size, enum dma_data_direction dir,
                    enum dma_sync_target target)
{
        phys_addr_t paddr = dma_to_phys(hwdev, dev_addr);
        BUG_ON(dir == DMA_NONE);
        if (is_swiotlb_buffer(paddr)) {
                swiotlb_tbl_sync_single(hwdev, paddr, size, dir, target);
                return;
        }
        if (dir != DMA_FROM_DEVICE)
                return;

        dma_mark_clean(phys_to_virt(paddr), size);
}

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-06-30 (木) 18:50:29