Thread (12 messages) 12 messages, 3 authors, 2019-08-03

Re: [PATCH 5/5] dma-mapping: remove ARCH_NO_COHERENT_DMA_MMAP

From: Christoph Hellwig <hch@lst.de>
Date: 2019-08-03 10:30:33
Also in: linux-arm-kernel, linux-iommu, linux-sh, lkml

On Fri, Aug 02, 2019 at 10:24:02AM +0200, Takashi Iwai wrote:
I wasn't careful enough to look at that change, sorry.

The code there tries to check whether dma_mmap_coherent() would always
fail on some platforms.  Then the driver clears the mmap capability
flag at the device open time and notifies user-space to fall back to
the dumb read/write mode.

So I'm afraid that simply dropping the check would cause the behavior
regression, e.g. on PARISC.

Is there any simple way to test whether dma_mmap_coherent() would work
or not in general on the target platform?  It's not necessarily in an
ifdef at all.
This isn't really a platform, but a per-device question.  I can add a
"bool dma_can_mmap(struct device *dev)" helper to check that.  But how
do I get at a suitable struct device in hw_support_mmap()?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help