Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753193AbdFVMqZ (ORCPT ); Thu, 22 Jun 2017 08:46:25 -0400 Received: from foss.arm.com ([217.140.101.70]:37702 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753107AbdFVMqV (ORCPT ); Thu, 22 Jun 2017 08:46:21 -0400 Subject: Re: [PATCH v5 2/7] dma: Add simple dma_noop_mmap To: Christoph Hellwig References: <1495621472-9323-1-git-send-email-vladimir.murzin@arm.com> <1495621472-9323-3-git-send-email-vladimir.murzin@arm.com> <20170620132324.GA11370@infradead.org> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, sza@esh.hu, arnd@arndb.de, gregkh@linuxfoundation.org, akpm@linux-foundation.org, alexandre.torgue@st.com, robin.murphy@arm.com, benjamin.gaignard@linaro.org, kbuild-all@01.org, Joerg Roedel , Christian Borntraeger From: Vladimir Murzin Message-ID: <8670225a-30a5-d567-0979-c96fd115a50f@arm.com> Date: Thu, 22 Jun 2017 13:46:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170620132324.GA11370@infradead.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 762 Lines: 22 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 :( > > In fact I suspect yours should call dma_mmap_from_coherent as well, > so the only different is the lack of pgprot_noncached call. > OK, I'll add a call to dma_mmap_from_coherent(). Cheers Vladimir