Messages in this thread | | | Date | Wed, 20 Oct 2021 15:23:12 -0700 | From | Jakub Kicinski <> | Subject | Re: [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.
| |