- 论坛徽章:
- 17
|
回复 1# humjb_1983
dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
unsigned long offset, size_t size,
enum dma_data_direction dir,
struct dma_attrs *attrs)
{
/*
* If the address happens to be in the device's DMA window,
* we can safely return the device addr and not worry about bounce
* buffering it.
*/
if (dma_capable(dev, dev_addr, size) && !swiotlb_force)
return dev_addr;
/* Oh well, have to allocate and map a bounce buffer. */
map = map_single(dev, phys, size, dir);
}
没仔细去研究dma_ops的初始化了,不过这个地方跟swiotlb=force有点关系,不知道你是不是使用了streaming dma mapping! |
|