Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1674578

Re: [PATCH v5 2/7] dma: Add simple dma_noop_mmap

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From Christoph Hellwig <hch@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v5 2/7] dma: Add simple dma_noop_mmap
Date Mon, 26 Jun 2017 11:50:02 +0200
Message-ID <tWyOC-EC-25@gated-at.bofh.it> (permalink)
References <tKBIe-15d-7@gated-at.bofh.it> <tKCkV-1Ap-5@gated-at.bofh.it> <tUroe-Jj-23@gated-at.bofh.it> <tV9IB-4Lr-13@gated-at.bofh.it>
X-Original-To Vladimir Murzin <vladimir.murzin@arm.com>
Dkim-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Uksw+ITNUOrHey8PnhrD1jh/U/WqFAW8zhISV5MXttw=; b=aI8jDhDkcVatjXWsSqBkOtykf xFyBCBJgtfUS6w/ZouXxgAN/C6Rlj1QhlzPdLfGTsvONpnzW11x5DIMUAg26/RB8huCtWRu6+AJLo cb2hK+lVjRjdcdTvVJNFIkec3WQfmyJ1nhWWGSaooDXMCoCrGDkPRcfoMqA2NLSKAMIqQkiATrMQp Rga74HhUDkL6PUfjg4/HTVVvQCrcQhJJzJ1wgUZPUHcxKGa3MRYX5kiaOiApkxFg3shPz+NefZxMe 35fsZNgeut4vRcip9y9TQFPdbgpSXLJQvI61wR6axCg0TkMZMNWBg9uSCktNIQytFg0cJDDYO9M/2 FeBy6xQ5g==;
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.8.0 (2017-02-23)
X-Srs-Rewrite SMTP reverse-path rewritten from <hch@infradead.org> by bombadil.infradead.org. See http://www.infradead.org/rpr.html
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 20
Organization linux.* mail to news gateway
X-Original-Cc Christoph Hellwig <hch@infradead.org>, 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 <jroedel@suse.de>, Christian Borntraeger <borntraeger@de.ibm.com>
X-Original-Date Mon, 26 Jun 2017 02:45:35 -0700
X-Original-Message-ID <20170626094535.GD21570@infradead.org>
X-Original-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> <8670225a-30a5-d567-0979-c96fd115a50f@arm.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1674578

Show key headers only | View raw


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.

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5 2/7] dma: Add simple dma_noop_mmap Christoph Hellwig <hch@infradead.org> - 2017-06-20 15:30 +0200
  Re: [PATCH v5 2/7] dma: Add simple dma_noop_mmap Vladimir Murzin <vladimir.murzin@arm.com> - 2017-06-22 14:50 +0200
    Re: [PATCH v5 2/7] dma: Add simple dma_noop_mmap Christoph Hellwig <hch@infradead.org> - 2017-06-26 11:50 +0200

csiph-web