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


Groups > linux.kernel > #1609902

Re: [RFC PATCH 3/3] of: fix node traversing in of_dma_get_range

From Robin Murphy <robin.murphy@arm.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 3/3] of: fix node traversing in of_dma_get_range
Date 2017-03-27 16:50 +0200
Message-ID <tpE82-11f-23@gated-at.bofh.it> (permalink)
References <toMAF-4Hq-3@gated-at.bofh.it> <toMAF-4Hq-11@gated-at.bofh.it> <tpDYm-XG-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Rob,

On 27/03/17 15:34, Rob Herring wrote:
> On Sat, Mar 25, 2017 at 12:31 AM, Oza Pawandeep <oza.oza@broadcom.com> wrote:
>> it jumps to the parent node without examining the child node.
>> also with that, it throws "no dma-ranges found for node"
>> for pci dma-ranges.
>>
>> this patch fixes device node traversing for dma-ranges.
> 
> What's the DT look like that doesn't work?

The problem is the bodge in pci_dma_configure() where we don't have an
OF node for the actual device itself, so pass in the host bridge's OF
node instead. This happens to work well enough for dma-coherent, but I
don't think dma-ranges was even considered at the time.

As it happens I'm currently halfway through writing an experiment
wherein pci_dma_configure() creates a temporary child node for the
of_dma_configure() call if no other suitable alternative (e.g. some
intermediate bridge node) exists. How hard are you likely to NAK that
approach? ;)

> dma-ranges is supposed to be a bus property, not a device's property.
> So looking at the parent is correct behavior generally.

Indeed, this patch as-is will break currently correct DTs (because we
won't find dma-ranges on the device, so will bail before even looking at
the parent as we should).

Robin.

> 
> Rob
> 

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


Thread

[RFC PATCH 1/3] of/pci: dma-ranges to account highest possible host bridge dma_mask Oza Pawandeep <oza.oza@broadcom.com> - 2017-03-25 06:40 +0100
  [RFC PATCH 3/3] of: fix node traversing in of_dma_get_range Oza Pawandeep <oza.oza@broadcom.com> - 2017-03-25 06:40 +0100
    Re: [RFC PATCH 3/3] of: fix node traversing in of_dma_get_range Rob Herring <robh@kernel.org> - 2017-03-27 16:40 +0200
      Re: [RFC PATCH 3/3] of: fix node traversing in of_dma_get_range Robin Murphy <robin.murphy@arm.com> - 2017-03-27 16:50 +0200
        Re: [RFC PATCH 3/3] of: fix node traversing in of_dma_get_range Oza Oza <oza.oza@broadcom.com> - 2017-03-28 07:00 +0200
  Re: [RFC PATCH 1/3] of/pci: dma-ranges to account highest possible  host bridge dma_mask Rob Herring <robh@kernel.org> - 2017-03-27 17:20 +0200
    Re: [RFC PATCH 1/3] of/pci: dma-ranges to account highest possible  host bridge dma_mask Oza Oza <oza.oza@broadcom.com> - 2017-03-28 07:30 +0200
      Re: [RFC PATCH 1/3] of/pci: dma-ranges to account highest possible  host bridge dma_mask Rob Herring <robh@kernel.org> - 2017-03-28 16:20 +0200
        Re: [RFC PATCH 1/3] of/pci: dma-ranges to account highest possible  host bridge dma_mask Oza Oza <oza.oza@broadcom.com> - 2017-03-30 12:20 +0200
      Re: [RFC PATCH 1/3] of/pci: dma-ranges to account highest possible  host bridge dma_mask Robin Murphy <robin.murphy@arm.com> - 2017-03-28 16:40 +0200
        Re: [RFC PATCH 1/3] of/pci: dma-ranges to account highest possible  host bridge dma_mask Oza Oza <oza.oza@broadcom.com> - 2017-03-29 06:50 +0200
          Re: [RFC PATCH 1/3] of/pci: dma-ranges to account highest possible  host bridge dma_mask Oza Oza <oza.oza@broadcom.com> - 2017-03-30 05:30 +0200

csiph-web