linux-4.4.1/swiotlb_sync_single()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#b2d24cef]
#backlinks
*説明 [#m03de219]
-パス: [[linux-4.4.1/lib/swiotlb.c]]
-FIXME: これは何?
--説明
**引数 [#u22da0c2]
-struct device *hwdev
--
--[[linux-4.4.1/device]]
-dma_addr_t dev_addr
--
--[[linux-4.4.1/dma_addr_t]]
-size_t size
--
-enum dma_data_direction dir
--
--[[linux-4.4.1/dma_data_direction]]
-enum dma_sync_target target
--
--[[linux-4.4.1/dma_sync_target]]
**返り値 [#za166ae8]
-なし
**参考 [#je39ef5d]
*実装 [#q4f0eccd]
/*
* Make physical memory consistent for a single streamin...
* after a transfer.
*
* If you perform a swiotlb_map_page() but wish to inter...
* using the cpu, yet do not wish to teardown the dma ma...
* call this function before doing so. At the next poin...
* address back to the card, you must first perform a
* swiotlb_dma_sync_for_device, and then the device agai...
*/
static void
swiotlb_sync_single(struct device *hwdev, dma_addr_t dev...
size_t size, enum dma_data_direction...
enum dma_sync_target target)
{
phys_addr_t paddr = dma_to_phys(hwdev, dev_addr);
-
--[[linux-4.4.1/phys_addr_t]]
--[[linux-4.4.1/dma_to_phys()]]
BUG_ON(dir == DMA_NONE);
-
--[[linux-4.4.1/BUG_ON()]]
if (is_swiotlb_buffer(paddr)) {
swiotlb_tbl_sync_single(hwdev, paddr, si...
return;
}
-
--[[linux-4.4.1/is_swiotlb_buffer()]]
--[[linux-4.4.1/swiotlb_tbl_sync_single()]]
if (dir != DMA_FROM_DEVICE)
return;
dma_mark_clean(phys_to_virt(paddr), size);
-
--[[linux-4.4.1/dma_mark_clean()]]
--[[linux-4.4.1/phys_to_virt()]]
}
*コメント [#l2c6483d]
終了行:
*参照元 [#b2d24cef]
#backlinks
*説明 [#m03de219]
-パス: [[linux-4.4.1/lib/swiotlb.c]]
-FIXME: これは何?
--説明
**引数 [#u22da0c2]
-struct device *hwdev
--
--[[linux-4.4.1/device]]
-dma_addr_t dev_addr
--
--[[linux-4.4.1/dma_addr_t]]
-size_t size
--
-enum dma_data_direction dir
--
--[[linux-4.4.1/dma_data_direction]]
-enum dma_sync_target target
--
--[[linux-4.4.1/dma_sync_target]]
**返り値 [#za166ae8]
-なし
**参考 [#je39ef5d]
*実装 [#q4f0eccd]
/*
* Make physical memory consistent for a single streamin...
* after a transfer.
*
* If you perform a swiotlb_map_page() but wish to inter...
* using the cpu, yet do not wish to teardown the dma ma...
* call this function before doing so. At the next poin...
* address back to the card, you must first perform a
* swiotlb_dma_sync_for_device, and then the device agai...
*/
static void
swiotlb_sync_single(struct device *hwdev, dma_addr_t dev...
size_t size, enum dma_data_direction...
enum dma_sync_target target)
{
phys_addr_t paddr = dma_to_phys(hwdev, dev_addr);
-
--[[linux-4.4.1/phys_addr_t]]
--[[linux-4.4.1/dma_to_phys()]]
BUG_ON(dir == DMA_NONE);
-
--[[linux-4.4.1/BUG_ON()]]
if (is_swiotlb_buffer(paddr)) {
swiotlb_tbl_sync_single(hwdev, paddr, si...
return;
}
-
--[[linux-4.4.1/is_swiotlb_buffer()]]
--[[linux-4.4.1/swiotlb_tbl_sync_single()]]
if (dir != DMA_FROM_DEVICE)
return;
dma_mark_clean(phys_to_virt(paddr), size);
-
--[[linux-4.4.1/dma_mark_clean()]]
--[[linux-4.4.1/phys_to_virt()]]
}
*コメント [#l2c6483d]
ページ名: