From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 6/6] xen: arm: Import of_bus PCI entry from Linux (as a dt_bus entry) Date: Fri, 3 Jul 2015 12:24:54 +0100 Message-ID: <55967106.9020807@citrix.com> References: <1431084401.2660.440.camel@citrix.com> <1431084420-14372-6-git-send-email-ian.campbell@citrix.com> <558D950A.7060101@citrix.com> <1435920431.9447.82.camel@citrix.com> <1435921011.9447.83.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1435921011.9447.83.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: julien.grall@linaro.org, tim@xen.org, stefano.stabellini@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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. 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. >> FWIW it also gets us the ability to parse the flags (cacheability), >> although at the moment we only check them for validity rather than use >> them. Good point. > I've pasted a slightly adjusted version of this into the commit message > for v5. Thank you! Regards, -- Julien Grall