From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC 03/24] xen/dts: Don't check the number of address and size cells in process_cpu_node Date: Thu, 22 Aug 2013 14:14:06 +0100 Message-ID: <52160E9E.9030401@linaro.org> References: <1376687156-6737-1-git-send-email-julien.grall@linaro.org> <1376687156-6737-4-git-send-email-julien.grall@linaro.org> <1377175887.9517.98.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1377175887.9517.98.camel@kazak.uk.xensource.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: patches@linaro.org, stefano.stabellini@eu.citrix.com, andrii.anisov@globallogic.com, xen-devel@lists.xen.org, andre.przywara@linaro.org, baozich@gmail.com List-Id: xen-devel@lists.xenproject.org On 08/22/2013 01:51 PM, Ian Campbell wrote: > On Fri, 2013-08-16 at 22:05 +0100, Julien Grall wrote: >> The properties #address-cells and #size-cells is not required in /cpus node in >> the device tree (see Linux Documentation/devicetree/booting-without-of.txt >> Section III.5.a). > > This isn't quite accurate, the properties must exist somewhere, if not > here then in the parent node, recursively, otherwise we cannot interpret > the reg properties etc. What isn't required is that they have the > particular values we are checking for. What about: The properties #address-cells and #size-cells may not correctly defines for CPUs node (see /Documentation/devicetree/booting-without-of.txt). >> >> In the OMAP5 device tree, these 2 properties are not defined. Therefore, Xen >> will only able to handle 1 CPU. >> >> Signed-off-by: Julien Grall >> CC: andrii.anisov@globallogic.com >> CC: baozich@gmail.com >> --- >> xen/common/device_tree.c | 6 ------ >> 1 file changed, 6 deletions(-) >> >> diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c >> index 84d704d..51f23eb 100644 >> --- a/xen/common/device_tree.c >> +++ b/xen/common/device_tree.c >> @@ -414,12 +414,6 @@ static void __init process_cpu_node(const void *fdt, int node, >> const u32 *cell; >> paddr_t start, size; >> >> - if ( address_cells != 1 || size_cells != 0 ) >> - { >> - early_printk("fdt: node `%s': invalid #address-cells or #size-cells", >> - name); >> - return; >> - } >> >> prop = fdt_get_property(fdt, node, "reg", NULL); >> if ( !prop ) > > -- Julien Grall