lkml.org 
[lkml]   [2021]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][linux-next] net: enetc: unmap DMA in enetc_send_cmd()
On Tue, 19 Oct 2021 19:47:17 +0000 Claudiu Manoil wrote:
> > I am curious why you do not need to call dma_sync_single_for_device()
> > before enetc_send_cmd()
> > in order to flush the contents of CPU cache to RAM. Is it because
> > __GFP_DMA marks
> > that page as uncached ? Or is it because of the SOC this runs on ?
> >
>
> Not sure how it works like this, but I think dma_alloc_coherent() should have
> been used here instead of the kmalloc + dma_map scheme.

Using dma_alloc_coherent() seems simpler and more correct,
let's do that instead.

\
 
 \ /
  Last update: 2021-10-21 00:24    [W:0.036 / U:1.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site