[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200323085059.GA32528@lst.de>
Date: Mon, 23 Mar 2020 09:50:59 +0100
From: Christoph Hellwig <hch@....de>
To: Alexey Kardashevskiy <aik@...abs.ru>
Cc: 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,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
Subject: Re: [PATCH 1/2] dma-mapping: add a dma_ops_bypass flag to struct
device
On Mon, Mar 23, 2020 at 09:37:05AM +0100, Christoph Hellwig wrote:
> > > + /*
> > > + * Allows IOMMU drivers to bypass dynamic translations if the DMA mask
> > > + * is large enough.
> > > + */
> > > + if (dev->dma_ops_bypass) {
> > > + if (min_not_zero(dev->coherent_dma_mask, dev->bus_dma_limit) >=
> > > + dma_direct_get_required_mask(dev))
> > > + return true;
> > > + }
> >
> >
> > Why not do this in dma_map_direct() as well?
>
> Mostly beacuse it is a relatively expensive operation, including a
> fls64.
Which I guess isn't too bad compared to a dynamic IOMMU mapping. Can
you just send a draft patch for what you'd like to see for ppc?
Powered by blists - more mailing lists