[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190806051242.GA13269@lst.de>
Date: Tue, 6 Aug 2019 07:12:42 +0200
From: Christoph Hellwig <hch@....de>
To: Gavin Li <gavinli@...gavinli.com>
Cc: Christoph Hellwig <hch@....de>, Shawn Anastasio <shawn@...stas.io>,
Michael Ellerman <mpe@...erman.id.au>,
Russell King <linux@...linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Paul Burton <paul.burton@...s.com>,
James Hogan <jhogan@...nel.org>, linuxppc-dev@...ts.ozlabs.org,
linux-mips@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, Gavin Li <git@...gavinli.com>
Subject: Re: [PATCH 1/2] dma-mapping: fix page attributes for dma_mmap_*
On Mon, Aug 05, 2019 at 07:55:44PM -0700, Gavin Li wrote:
> > /* create a coherent mapping */
> > ret = dma_common_contiguous_remap(page, size, VM_USERMAP,
> > - arch_dma_mmap_pgprot(dev, PAGE_KERNEL, attrs),
> > + dma_pgprot(dev, PAGE_KERNEL, attrs),
> > __builtin_return_address(0));
> > if (!ret) {
> > __dma_direct_free_pages(dev, size, page);
>
> Is dma_common_contiguous_remap() still necessary in the
> DMA_ATTR_NON_CONSISTENT case? I would presume it would be fine to just
> return a linearly mapped address in that case.
It would not be required for a real DMA_ATTR_NON_CONSISTENT
implementation. But only parisc and mips actually properly implement
DMA_ATTR_NON_CONSISTENT, everyone ignores it. Given that the API is
a little ill defined and I have a better replacement in the pipeline
I don't want to start implementing it for other architectures now.
Powered by blists - more mailing lists