public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: dma_alloc_coherent versus streaming DMA, neither works satisfactory
Date: Wed, 29 Apr 2015 12:41:30 +0200	[thread overview]
Message-ID: <3382997.5hgfVKmNXP@wuerfel> (raw)
In-Reply-To: <5540B35C.4050002@topic.nl>

On Wednesday 29 April 2015 12:33:00 Mike Looijmans wrote:
> On 29-04-15 12:07, Arnd Bergmann wrote:
> > On Wednesday 29 April 2015 11:47:37 Mike Looijmans wrote:
> >> On 29-04-15 11:17, Russell King - ARM Linux wrote:
> >>> The buffer should also be mapped into userspace with the same memory
> >>> type and cache attributes as the kernel side mapping.  If using ACP,
> >>> then you probably want "normal memory, cacheable, writeback, read
> >>> allocate" or in the case of SMP, the same but "read/write allocate".
> >
> > If my suspicion is correct, we should either change arm_coherent_dma_ops()
> > to refer to a different mmap() callback that does the right thing for
> > coherent devices, or change arm_dma_mmap() to look at dev->is_coherent.
> 
> Following the route, arch/arm/mm/dma-mapping.c uses pgprot_dmacoherent() which 
> is defined in arch/arm/include/asm/pgtable.h and that just returns uncached 
> memory.
> 
> If you can give me some hints as to what the correct flags would be, I can 
> patch my kernel and test it.

Use the flags that Russell listed above.

	Arnd

  reply	other threads:[~2015-04-29 10:41 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23 11:52 dma_alloc_coherent versus streaming DMA, neither works satisfactory Mike Looijmans
2015-04-23 12:32 ` Arnd Bergmann
2015-04-23 13:05   ` Mike Looijmans
2015-04-29  8:47   ` Mike Looijmans
2015-04-29  9:01     ` Arnd Bergmann
2015-04-29  9:17       ` Russell King - ARM Linux
2015-04-29  9:47         ` Mike Looijmans
2015-04-29 10:07           ` Arnd Bergmann
2015-04-29 10:33             ` Mike Looijmans
2015-04-29 10:41               ` Arnd Bergmann [this message]
2015-04-29 12:49                 ` Mike Looijmans
2015-04-29 13:13                   ` Arnd Bergmann
2015-04-30 13:50                     ` Mike Looijmans
2015-04-30 13:54                       ` Arnd Bergmann
2015-05-01  6:08                         ` Mike Looijmans
2015-05-01  7:01                           ` Mike Looijmans
2015-05-07 11:18                     ` Mike Looijmans
2015-05-07 11:56                       ` Arnd Bergmann
2015-05-07 13:21                       ` Daniel Drake
2015-05-07 13:31                         ` Mike Looijmans
2015-05-07 14:08                           ` Mike Looijmans
2015-05-07 14:30                             ` Russell King - ARM Linux
2015-05-08  5:55                               ` Mike Looijmans
2015-05-08  7:54                                 ` Arnd Bergmann
2015-05-08  8:31                                   ` Mike Looijmans
2015-05-08 13:19                                     ` Arnd Bergmann
2015-05-08 14:18                                       ` Mike Looijmans
2015-05-08 14:27                                         ` Arnd Bergmann
2015-05-08 11:10                                 ` Russell King - ARM Linux
2015-05-08 12:17                                   ` Mike Looijmans
2015-04-29 11:09             ` Mike Looijmans
2015-04-29 12:35               ` Arnd Bergmann
2015-04-29 12:52                 ` Mike Looijmans
2015-04-29 12:54                   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3382997.5hgfVKmNXP@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox