lkml.org 
[lkml]   [2017]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [Question] devm_kmalloc() for DMA ?
    From
    Date
    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.

    \
     
     \ /
      Last update: 2017-03-08 21:45    [W:3.430 / U:0.248 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site