On Wed, Mar 21, 2018 at 02:55:33PM +0800, Arnd Bergman wrote: > On Wed, Mar 21, 2018 at 11:07 AM, David Gibson > <david@xxxxxxxxxxxxxxxxxxxxx> wrote: > > On Tue, Mar 20, 2018 at 03:54:08AM -0500, Rob Herring wrote: > >> Having a 'bus-range' property for PCI bridges should not be required, > > > > Hmm. Shouldn't it? I thought it was a required property, but I'm > > having trouble interpreting the information in the PCI binding > > document to confirm that. > > Linux prints a message about the property not being there for the host > bridge node, but I believe that was meant to be informational rather > than a warning. > > The original PCI binding never had this property because it expected > the buses to be assigned by OF before we got into the kernel. Uh.. what? I'm guessing you mean that it *did* have the property because it expected the bus numbers to be assigned in firmware, rather than the other way around. > The problem we ran into with the dtc warning is when it warning about > child nodes of the pci host bridge on Marvell and Nvidia platforms. > These are device_type="pci" and correspond to a pcie root port, > but should get the bus numbers assigned dynamically. Dynamically meaning what exactly? > One patch got applied to the kernel to set all bus ranges for > marvell to 1-255 for each port, but that's obviously nonsense, > because they should really be non-overlapping within one > domain. > > We could in theory have a check to enforce non-overlapping > bus ranges on pcie bridge nodes, with each one being within > the range of the parent node, but as this is such a rare case, > leaving out the warning seems easier. I just want to prevent > the warning from causing other people to actively add wrong > properties. Hrm. So, if firmware isn't enumerating the bus, the obviously it doesn't make sense to include bus-range properties. But is there a case where it doesn't make sense to include bus-range, but it *does* make sense to include the node at all? If the OS is going to enumerate the bus, it should be able to probe the bridges itself, yes? -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Attachment:
signature.asc
Description: PGP signature