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


Groups > linux.kernel > #1595514

Re: [Question] devm_kmalloc() for DMA ?

From Lars-Peter Clausen <lars@metafoo.de>
Newsgroups linux.kernel
Subject Re: [Question] devm_kmalloc() for DMA ?
Date 2017-03-08 21:50 +0100
Message-ID <tiQH0-3gA-19@gated-at.bofh.it> (permalink)
References <tiHDI-5Js-13@gated-at.bofh.it> <tiHNo-5Nf-31@gated-at.bofh.it> <tiOc9-1K6-15@gated-at.bofh.it> <tiQdY-35t-33@gated-at.bofh.it> <tiQdY-35t-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 03/08/2017 08:59 PM, Russell King - ARM Linux wrote:
> On Wed, Mar 08, 2017 at 08:48:31PM +0100, Lars-Peter Clausen wrote:
>> When the DMA memory is mapped for reading from the device the associated
>> cachelines are invalidated without writeback. There is no guarantee that
>> the changes made to the devres_node have made it to main memory yet, or
>> is there?
> 
> That is incorrect.
> 
> Overlapping cache lines are always written back on transitions from CPU
> to device ownership of the buffer (eg, dma_map_*().)

On ARM. But my understanding is that this is not a universal requirement
according to DMA-API.txt. It says that mappings must be cache line aligned
and otherwise behavior is undefined.

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


Thread

[Question] devm_kmalloc() for DMA ? Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-08 12:10 +0100
  Re: [Question] devm_kmalloc() for DMA ? Robin Murphy <robin.murphy@arm.com> - 2017-03-08 12:20 +0100
    Re: [Question] devm_kmalloc() for DMA ? Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-08 19:10 +0100
      Re: [Question] devm_kmalloc() for DMA ? Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-03-08 21:20 +0100
        Re: [Question] devm_kmalloc() for DMA ? Lars-Peter Clausen <lars@metafoo.de> - 2017-03-08 21:50 +0100
          Re: [Question] devm_kmalloc() for DMA ? Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-03-08 22:30 +0100
            Re: [Question] devm_kmalloc() for DMA ? Lars-Peter Clausen <lars@metafoo.de> - 2017-03-09 00:10 +0100
              Re: [Question] devm_kmalloc() for DMA ? Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-03-09 04:30 +0100
                Re: [Question] devm_kmalloc() for DMA ? Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-03-09 10:30 +0100
      Re: [Question] devm_kmalloc() for DMA ? Lars-Peter Clausen <lars@metafoo.de> - 2017-03-08 21:50 +0100
      Re: [Question] devm_kmalloc() for DMA ? Robin Murphy <robin.murphy@arm.com> - 2017-03-09 12:30 +0100

csiph-web