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

[Xen-changelog] [xen master] xen/arm: use correct device tree root node name



commit 8706d38479218dcf549a94516918c3e3b30a7bb0
Author:     Will Abele <will.abele@xxxxxxxxxx>
AuthorDate: Tue Jul 9 13:22:23 2019 +0000
Commit:     Julien Grall <julien.grall@xxxxxxx>
CommitDate: Tue Jul 9 15:16:43 2019 +0100

    xen/arm: use correct device tree root node name
    
    The root node of a device tree should not have a node name. This is
    specified in section 2.2.1 of version 0.2 of the device tree
    specification, available from devicetree.org.
    
    Linux Kernel versions prior to 4.15 misinterpret flattened device trees
    with a "/" as the name of the root node as an FDT version older than 16.
    Linux then fails to parse the FDT.
    
    Signed-off-by: Will Abele <will.abele@xxxxxxxxxx>
    Reviewed-by: Julien Grall <julien.grall@xxxxxxx>
---
 xen/arch/arm/acpi/domain_build.c | 2 +-
 xen/arch/arm/domain_build.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/acpi/domain_build.c b/xen/arch/arm/acpi/domain_build.c
index 5aae32ac20..1b1cfabb00 100644
--- a/xen/arch/arm/acpi/domain_build.c
+++ b/xen/arch/arm/acpi/domain_build.c
@@ -145,7 +145,7 @@ static int __init create_acpi_dtb(struct kernel_info *kinfo,
     if ( ret < 0 )
         goto err;
 
-    ret = fdt_begin_node(kinfo->fdt, "/");
+    ret = fdt_begin_node(kinfo->fdt, "");
     if ( ret < 0 )
         goto err;
 
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 16ce5222ca..c1981836a6 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1715,7 +1715,7 @@ static int __init prepare_dtb_domU(struct domain *d, 
struct kernel_info *kinfo)
     if ( ret < 0 )
         goto err;
 
-    ret = fdt_begin_node(kinfo->fdt, "/");
+    ret = fdt_begin_node(kinfo->fdt, "");
     if ( ret < 0 )
         goto err;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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