Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1515017
| From | Alexey Brodkin <Alexey.Brodkin@synopsys.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH v2] arc: Implement arch-specific dma_map_ops.mmap |
| Date | 2016-11-04 06:40 +0100 |
| Message-ID | <szFom-5NS-5@gated-at.bofh.it> (permalink) |
| References | <szrOp-5vm-15@gated-at.bofh.it> <sztGy-6N2-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Vineet, > -----Original Message----- > From: Vineet Gupta [mailto:vgupta@synopsys.com] > Sent: Thursday, November 03, 2016 8:04 PM > To: Alexey Brodkin <Alexey.Brodkin@synopsys.com>; linux-snps-arc@lists.infradead.org > Cc: linux-kernel@vger.kernel.org; linux-arch@vger.kernel.org; Vineet Gupta <Vineet.Gupta1@synopsys.com>; Marek Szyprowski > <m.szyprowski@samsung.com>; stable@vger.kernel.org > Subject: Re: [PATCH v2] arc: Implement arch-specific dma_map_ops.mmap > > On 11/03/2016 08:06 AM, Alexey Brodkin wrote: > > We used to use generic implementation of dma_map_ops.mmap which is > > dma_common_mmap() but that only worked for simpler cached mappings when > > vaddr = paddr. > > > > If a driver requests uncached DMA buffer kernel maps it to virtual > > address so that MMU gets involved and page uncached status takes into > > account. In that case usage of dma_common_mmap() lead to mapping of > > vaddr to vaddr for user-space which is obviously wrong. For more detals > > please refer to verbose explanation here [1]. > > > > So here we implement our own version of mmap() which always deals > > with dma_addr and maps underlying memory to user-space properly > > (note that DMA buffer mapped to user-space is always uncached > > because there's no way to properly manage cache from user-space). > > > > [1] https://lkml.org/lkml/2016/10/26/973 > > > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> > > Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> > > Cc: Marek Szyprowski <m.szyprowski@samsung.com> > > Cc: Vineet Gupta <vgupta@synopsys.com> > > Cc: <stable@vger.kernel.org> > > I've added a stable 4.5+, since ARC didn't use dma ops until 4.5-rc1. Again I was hitting a strange problem when sending patch via "git send-email" to address "<stable@vger.kernel.org> # 3.3.x". Mail server complains on wrong email. Thus I settled to just mention stable@vger.kernel.org. Anyways, thanks for doing that! -Alexey
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2] arc: Implement arch-specific dma_map_ops.mmap Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-11-03 16:10 +0100
Re: [PATCH v2] arc: Implement arch-specific dma_map_ops.mmap Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-11-03 18:10 +0100
RE: [PATCH v2] arc: Implement arch-specific dma_map_ops.mmap Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2016-11-04 06:40 +0100
csiph-web