diff mbox

[V1,03/29] xen/dts: Don't check the number of address and size cells in process_cpu_node

Message ID 1377701263-3319-4-git-send-email-julien.grall@linaro.org
State Accepted, archived
Headers show

Commit Message

Julien Grall Aug. 28, 2013, 2:47 p.m. UTC
CPU nodes are not required to have #address-cells == 1 and #size-cells == 0, so
don't check for that (see Linux Documentation/devicetree/booting-without-of.txt
Section III.5.a).

In some OMAP5 device, tree, these 2 properties are not correctly set. Therefore,
Xen will only able to handle 1 CPU.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
CC: andrii.anisov@globallogic.com
CC: baozich@gmail.com

---
    Changes in v2:
        - Update commit message
---
 xen/common/device_tree.c |    6 ------
 1 file changed, 6 deletions(-)

Comments

Ian Campbell Sept. 6, 2013, 4:24 p.m. UTC | #1
On Wed, 2013-08-28 at 15:47 +0100, Julien Grall wrote:
> CPU nodes are not required to have #address-cells == 1 and #size-cells == 0, so
> don't check for that (see Linux Documentation/devicetree/booting-without-of.txt
> Section III.5.a).
> 
> In some OMAP5 device, tree, these 2 properties are not correctly set. Therefore,
> Xen will only able to handle 1 CPU.
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

> CC: andrii.anisov@globallogic.com
> CC: baozich@gmail.com
> 
> ---
>     Changes in v2:
>         - Update commit message
> ---
>  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 3a3c99c..c4f0f2c 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 )
Ian Campbell Sept. 10, 2013, 10:52 a.m. UTC | #2
On Fri, 2013-09-06 at 17:24 +0100, Ian Campbell wrote:
> On Wed, 2013-08-28 at 15:47 +0100, Julien Grall wrote:
> > CPU nodes are not required to have #address-cells == 1 and #size-cells == 0, so
> > don't check for that (see Linux Documentation/devicetree/booting-without-of.txt
> > Section III.5.a).
> > 
> > In some OMAP5 device, tree, these 2 properties are not correctly set. Therefore,
> > Xen will only able to handle 1 CPU.
> > 
> > Signed-off-by: Julien Grall <julien.grall@linaro.org>
> 
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> 
> > CC: andrii.anisov@globallogic.com
> > CC: baozich@gmail.com

I missed Chen's ack from
<CCE916EB-FC49-41D4-B672-9BD0D021222C@gmail.com> when I applied this,
please remember to collect them into reposts.
Julien Grall Sept. 10, 2013, 10:54 a.m. UTC | #3
On 09/10/2013 11:52 AM, Ian Campbell wrote:
> On Fri, 2013-09-06 at 17:24 +0100, Ian Campbell wrote:
>> On Wed, 2013-08-28 at 15:47 +0100, Julien Grall wrote:
>>> CPU nodes are not required to have #address-cells == 1 and #size-cells == 0, so
>>> don't check for that (see Linux Documentation/devicetree/booting-without-of.txt
>>> Section III.5.a).
>>>
>>> In some OMAP5 device, tree, these 2 properties are not correctly set. Therefore,
>>> Xen will only able to handle 1 CPU.
>>>
>>> Signed-off-by: Julien Grall <julien.grall@linaro.org>
>>
>> Acked-by: Ian Campbell <ian.campbell@citrix.com>
>>
>>> CC: andrii.anisov@globallogic.com
>>> CC: baozich@gmail.com
> 
> I missed Chen's ack from
> <CCE916EB-FC49-41D4-B672-9BD0D021222C@gmail.com> when I applied this,
> please remember to collect them into reposts.
> 
> 

Sorry, as I modified the patch (here the commit message), I though Chen
have to re-ack it.
Ian Campbell Sept. 10, 2013, 11:03 a.m. UTC | #4
On Tue, 2013-09-10 at 11:54 +0100, Julien Grall wrote:
> On 09/10/2013 11:52 AM, Ian Campbell wrote:
> > On Fri, 2013-09-06 at 17:24 +0100, Ian Campbell wrote:
> >> On Wed, 2013-08-28 at 15:47 +0100, Julien Grall wrote:
> >>> CPU nodes are not required to have #address-cells == 1 and #size-cells == 0, so
> >>> don't check for that (see Linux Documentation/devicetree/booting-without-of.txt
> >>> Section III.5.a).
> >>>
> >>> In some OMAP5 device, tree, these 2 properties are not correctly set. Therefore,
> >>> Xen will only able to handle 1 CPU.
> >>>
> >>> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> >>
> >> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> >>
> >>> CC: andrii.anisov@globallogic.com
> >>> CC: baozich@gmail.com
> > 
> > I missed Chen's ack from
> > <CCE916EB-FC49-41D4-B672-9BD0D021222C@gmail.com> when I applied this,
> > please remember to collect them into reposts.
> > 
> > 
> 
> Sorry, as I modified the patch (here the commit message), I though Chen
> have to re-ack it.

It depends, minor stuff like that doesn't invalidate an Ack IMHO. But
you are right, it's a judgement call.

Ian.
diff mbox

Patch

diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 3a3c99c..c4f0f2c 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 )