Re: [PATCH 08/20] powerpc/dma: remove the unused dma_nommu_ops export
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH 08/20] powerpc/dma: remove the unused dma_nommu_ops export
- From: Christoph Hellwig <hch@xxxxxx>
- Date: Wed, 22 Aug 2018 08:45:31 +0200
- Cc: Christoph Hellwig <hch@xxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Fenghua Yu <fenghua.yu@xxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, Robin Murphy <robin.murphy@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
- In-reply-to: <f7daffa5481ab82f345aa5bf9f63f40caa068456.camel@kernel.crashing.org>
- References: <20180730163824.10064-1-hch@lst.de> <20180730163824.10064-9-hch@lst.de> <20180731121625.GA29793@lst.de> <f7daffa5481ab82f345aa5bf9f63f40caa068456.camel@kernel.crashing.org>
- User-agent: Mutt/1.5.17 (2007-11-01)
On Thu, Aug 09, 2018 at 10:01:16AM +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2018-07-31 at 14:16 +0200, Christoph Hellwig wrote:
> > It turns out cxl actually uses it. So for now skip this patch,
> > although random code in drivers messing with dma ops will need to
> > be sorted out sooner or later.
>
> CXL devices are "special", they bypass the classic iommu in favor of
> allowing the device to operate using the main processor page tables
> using an MMU context (so basically the device can use userspace
> addresses directly), akin to ATS.
>
> I think the code currently uses the nommu ops as a way to do a simple
> kernel mapping for kernel drivers using CXL (not userspace stuff)
> though.
Its still a horrible idea to have this in drivers/, we need some
core API to mediate this behavior. Also if the device supports
using virtual addresses dma_nommu_ops seems wrong as it won't do
the right thing for e.g. vmalloc addresses not mapped into the
kernel linear mapping (which I guess can't currently happen on
powerpc, but still..)
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]