From: Jakub Kicinski <kuba@kernel.org>
To: Claudiu Manoil <claudiu.manoil@nxp.com>,
Tim Gardner <tim.gardner@canonical.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Po Liu <po.liu@nxp.com>
Subject: Re: [PATCH][linux-next] net: enetc: unmap DMA in enetc_send_cmd()
Date: Wed, 20 Oct 2021 15:23:12 -0700 [thread overview]
Message-ID: <20211020152312.6a7a9ffb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <AM9PR04MB8397F300DECD3C44D2EBD07796BD9@AM9PR04MB8397.eurprd04.prod.outlook.com>
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.
prev parent reply other threads:[~2021-10-20 22:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 18:19 [PATCH][linux-next] net: enetc: unmap DMA in enetc_send_cmd() Tim Gardner
2021-10-19 19:47 ` Claudiu Manoil
2021-10-20 22:23 ` Jakub Kicinski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211020152312.6a7a9ffb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=po.liu@nxp.com \
--cc=tim.gardner@canonical.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).