[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200324075514.GK23447@lst.de>
Date: Tue, 24 Mar 2020 08:55:14 +0100
From: Christoph Hellwig <hch@....de>
To: "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
Cc: Alexey Kardashevskiy <aik@...abs.ru>,
Christoph Hellwig <hch@....de>,
iommu@...ts.linux-foundation.org, linuxppc-dev@...ts.ozlabs.org,
Lu Baolu <baolu.lu@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Joerg Roedel <joro@...tes.org>,
Robin Murphy <robin.murphy@....com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct
device
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.
Powered by blists - more mailing lists