lkml.org 
[lkml]   [2017]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 2/7] dma: Add simple dma_noop_mmap
On Thu, Jun 22, 2017 at 01:46:09PM +0100, Vladimir Murzin wrote:
> On 20/06/17 14:23, Christoph Hellwig wrote:
> > On Wed, May 24, 2017 at 11:24:27AM +0100, Vladimir Murzin wrote:
> >> This patch adds a simple implementation of mmap to dma_noop_ops.
> >
> > Currently we use dma_common_mmap as the generic fallback if a dma_ops
> > instance doesn't implement a mmap method. Can you just fix up
> > dma_common_mmap for your nommu case - it looks like yours is basically
> > a subset.
>
> dma_common_map() is guarded with CONFIG_MMU and I'm not dare to change that
> since I have no idea 1) why it was done 2) how it affects other arches :(

That's still not a good reason for duplicating it. Please instead
make all the existing nommu architecture select
CONFIG_ARCH_NO_COHERENT_DMA_MMAP as a prep patch, then provide an
arch helper to abstract away the pgprot_noncached, then lift
CONFIG_ARCH_NO_COHERENT_DMA_MMAP for arm nommu. Bonus points
for lifting it elsewhere or consolidating various copy & paste
versions of the function.

\
 
 \ /
  Last update: 2017-06-26 11:46    [W:0.084 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site