[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 6/6] xen: arm: Import of_bus PCI entry from Linux (as a dt_bus entry)



On Fri, 2015-07-03 at 12:24 +0100, Julien Grall wrote:
> On 03/07/15 11:56, Ian Campbell wrote:
> > On Fri, 2015-07-03 at 11:47 +0100, Ian Campbell wrote:
> >> On Fri, 2015-06-26 at 20:08 +0200, Julien Grall wrote:
> >>> Hi Ian,
> >>>
> >>> On 08/05/2015 13:27, Ian Campbell wrote:
> >>>> This provides specific handlers for the PCI bus relating to matching
> >>>> and translating. It's mostly similar to the defaults but includes some
> >>>> additional error checks and other PCI specific bits.
> >>>
> >>> I though the previous patch (#5) was enough to handle PCI. May I ask why 
> >>> we need it?
> >>
> >> There are some subtle differences in how the generic code vs. the pci
> >> specific code here will handle buggy DTs (i.e. #*-cells which are not as
> >> required by the pci bindings). This will mean we tolerate such device
> >> trees better.
> >>
> >> I say "buggy", but actually it's not clear to me from reading "PCI Bus
> >> Binding to Open Firmware" that when the device_type is "pci" that
> >> #*-cells shouldn't be assumed to have the values given in that text,
> >> e.g. the text says "The value of "#address-cells" for PCI Bus Nodes is
> >> 3." and not "A PCI Bus Node must contain a #address-cells property
> >> containing 3". Maybe that interpretation is bogus, but with this patch
> >> we are are able to cope with DTs written by people who do read it like
> >> that.
> 
> If the #address-cells and #size-cells are not correct that will likely
> means that the property "reg" in the PCI node would be misinterpreted by
> Xen.

Right, everything falls apart in that case anyway, unless the #*-cells
properties are inconsistent with a regs which correctly follows the
spec, but that's the most unlikely case I think.

> I think it's here to cope with DT when #*-cells are not specified. The
> spec doesn't say if the properties should be present or not.

Right.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.