linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Mikko Perttunen <cyndis@kapsi.fi>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Mikko Perttunen <mperttunen@nvidia.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-tegra@vger.kernel.org,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse
Date: Thu, 20 Apr 2017 10:49:32 +0100	[thread overview]
Message-ID: <20170420094932.GM17774@n2100.armlinux.org.uk> (raw)
In-Reply-To: <CAK8P3a3JJrA_4Zur47ngWmR7VeKBopJLNZCaqOPzzmnFoV3=Ew@mail.gmail.com>

On Thu, Apr 20, 2017 at 10:25:01AM +0200, Arnd Bergmann wrote:
> On Thu, Apr 20, 2017 at 9:02 AM, Mikko Perttunen <cyndis@kapsi.fi> wrote:
> > I think we have a "policy" on Tegra that the DMA API will never allocate
> > using the IOMMU (Thierry can elaborate on this), which is why I wrote the
> > code with that assumption. Essentially, we have made the DMA API into the
> > API that allocates CPU-visible memory.
> 
> I don't think this can be a per-platform policy.
> 
> > Considering that, I'm wondering if we can just have a temporary local
> > dma_addr_t and then cast that to phys_addr_t, combined with a good comment?
> 
> That was my first approach, and it does address the warning, but
> I did not send it because it still felt too wrong.

Sounds to me like the warning is justified - it's saying that there's
something not right here which could be a problem.  So I'd say, don't
fix the warning, it's doing its job, highlighting a potential problem
with the code.

(Consider hiding the warning and then running on a platform where the
assumptions are broken.)

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  parent reply	other threads:[~2017-04-20  9:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 18:24 [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Arnd Bergmann
2017-04-20  7:02 ` Mikko Perttunen
2017-04-20  8:25   ` Arnd Bergmann
2017-04-20  9:44     ` Mikko Perttunen
2017-04-20 10:02       ` Arnd Bergmann
2017-04-20 10:14         ` Mikko Perttunen
2017-04-20  9:49     ` Russell King - ARM Linux [this message]
2017-04-20 10:05       ` Arnd Bergmann

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=20170420094932.GM17774@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=arnd@arndb.de \
    --cc=cyndis@kapsi.fi \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=thierry.reding@gmail.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).