On Tue, Mar 24, 2020 at 12:00:09PM +0530, Aneesh Kumar K.V wrote:
> dma_addr_t dma_direct_map_page(struct device *dev, struct page *page,
>               unsigned long offset, size_t size, enum dma_data_direction dir,
>               unsigned long attrs)
> {
>       phys_addr_t phys = page_to_phys(page) + offset;
>       dma_addr_t dma_addr = phys_to_dma(dev, phys);
> 
>       if (unlikely(!dma_capable(dev, dma_addr, size, true))) {
>                       return iommu_map(dev, phys, size, dir, attrs);
> 
>               return DMA_MAPPING_ERROR;

If powerpc hardware / firmware people really come up with crap that
stupid you'll have to handle it yourself and will always pay the
indirect call penality.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to