From: Christoph Hellwig <hch@infradead.org>
To: David Miller <davem@davemloft.net>
Cc: brian.brooks@linaro.org, antoine.tenart@bootlin.com,
maxime.chevallier@bootlin.com, ymarkman@marvell.com,
stefanc@marvell.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, bjorn.topel@intel.com,
brian.brooks@arm.com
Subject: Re: [PATCH] net: mvpp2: avoid bouncing buffers
Date: Sun, 19 Aug 2018 23:23:26 -0700 [thread overview]
Message-ID: <20180820062326.GA22222@infradead.org> (raw)
In-Reply-To: <20180819.195505.1988137313680465320.davem@davemloft.net>
On Sun, Aug 19, 2018 at 07:55:05PM -0700, David Miller wrote:
> From: Brian Brooks <brian.brooks@linaro.org>
> Date: Sun, 19 Aug 2018 21:47:30 -0500
>
> > @@ -5126,6 +5126,12 @@ static int mvpp2_probe(struct platform_device *pdev)
> > }
> >
> > if (priv->hw_version == MVPP22) {
> > + /* Platform code may have set dev->dma_mask to point
> > + * to dev->coherent_dma_mask, but we want to ensure
> > + * they take different values due to comment below.
> > + */
> > + pdev->dev.dma_mask = &priv->dma_mask;
>
> The platform code might be doing this exactly because it cannot support
> different coherent and streaming DMA masks.
>
> Well, in any case, the platform code is doing it for a reason and
> overriding this in a "driver" of all places seems totally
> inappropriate and at best a layering violation.
>
> I would rather you fix this in a way that involves well defined APIs
> that set the DMA masks or whatever to the values that you need, rather
> than going behind the platform code's back and changing the DMA mask
> pointer like this.
Agreed. What platform do you see this issue on?
next prev parent reply other threads:[~2018-08-20 9:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-20 2:47 [PATCH] net: mvpp2: avoid bouncing buffers Brian Brooks
2018-08-20 2:55 ` David Miller
2018-08-20 6:23 ` Christoph Hellwig [this message]
2018-08-20 7:02 ` Yan Markman
2018-08-27 13:55 ` Brian Brooks
2018-08-27 15:48 ` Christoph Hellwig
2018-09-02 2:10 ` Brian Brooks
2019-03-01 14:26 ` Antoine Tenart
2019-03-11 15:46 ` Christoph Hellwig
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=20180820062326.GA22222@infradead.org \
--to=hch@infradead.org \
--cc=antoine.tenart@bootlin.com \
--cc=bjorn.topel@intel.com \
--cc=brian.brooks@arm.com \
--cc=brian.brooks@linaro.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=stefanc@marvell.com \
--cc=ymarkman@marvell.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).