Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670758 > unrolled thread
| Started by | Christoph Hellwig <hch@infradead.org> |
|---|---|
| First post | 2017-06-20 15:30 +0200 |
| Last post | 2017-06-26 11:50 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
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
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Date | 2017-06-20 15:30 +0200 |
| Subject | Re: [PATCH v5 2/7] dma: Add simple dma_noop_mmap |
| Message-ID | <tUroe-Jj-23@gated-at.bofh.it> |
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. In fact I suspect yours should call dma_mmap_from_coherent as well, so the only different is the lack of pgprot_noncached call.
[toc] | [next] | [standalone]
| From | Vladimir Murzin <vladimir.murzin@arm.com> |
|---|---|
| Date | 2017-06-22 14:50 +0200 |
| Message-ID | <tV9IB-4Lr-13@gated-at.bofh.it> |
| In reply to | #1670758 |
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
[toc] | [prev] | [next] | [standalone]
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Date | 2017-06-26 11:50 +0200 |
| Message-ID | <tWyOC-EC-25@gated-at.bofh.it> |
| In reply to | #1672599 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web