lkml.org 
[lkml]   [2016]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] ARM: dma-mapping: fix alloc/free for coherent + CMA + gfp=0
    On Fri, Feb 19, 2016 at 02:50:52PM +0100, Michal Nazarewicz wrote:
    > I haven’t looked closely at the code, but why not:
    >
    > struct cma *cma =
    > if (!cma_release(dev_get_cma_area(dev), page, size >> PAGE_SHIFT)) {
    > // ... do whatever other non-CMA free
    > }

    The page tables changes need to be done before we release the area with
    cma_release(). With the v2 patchset which I've sent to LAKML we won't
    need a new in_cma() function since we'll now record how we allocated the
    buffer and use this information in the free routine.

    \
     
     \ /
      Last update: 2016-02-23 16:41    [W:5.187 / U:0.472 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site