Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1627274

Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse
Date 2017-04-20 12:10 +0200
Message-ID <tyhcf-7D4-37@gated-at.bofh.it> (permalink)
References <ty2wy-6N4-3@gated-at.bofh.it> <tyeo3-5TJ-29@gated-at.bofh.it> <tyfDs-6zX-21@gated-at.bofh.it> <tygSS-7gN-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Apr 20, 2017 at 11:49 AM, Russell King - ARM Linux
<linux@armlinux.org.uk> wrote:
> 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.

Absolutely.

> 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.)

The problem is that I'm probably the only one who ever sees that
warning since you don't see it in any defconfig builds that all have
the same width for dma_addr_t and phys_addr_t.

The other alternative would be to ask for the patch that introduced
the warning to get reverted before it makes it into v4.12, if we can't
come up with a proper way to do this.

      Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Arnd Bergmann <arnd@arndb.de> - 2017-04-19 20:30 +0200
  Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Mikko Perttunen <cyndis@kapsi.fi> - 2017-04-20 09:10 +0200
    Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Arnd Bergmann <arnd@arndb.de> - 2017-04-20 10:30 +0200
      Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Mikko Perttunen <cyndis@kapsi.fi> - 2017-04-20 11:50 +0200
        Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Arnd Bergmann <arnd@arndb.de> - 2017-04-20 12:10 +0200
          Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Mikko Perttunen <cyndis@kapsi.fi> - 2017-04-20 12:20 +0200
      Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-04-20 11:50 +0200
        Re: [PATCH] [RFC] gpu: host1x: shut up warning about DMA API misuse Arnd Bergmann <arnd@arndb.de> - 2017-04-20 12:10 +0200

csiph-web