xen/arm: domain_build: Prepare DTB/ACPI tables after specific mappings
authorJulien Grall <julien.grall@arm.com>
Tue, 27 Feb 2018 15:15:53 +0000 (15:15 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 2 Mar 2018 23:15:45 +0000 (15:15 -0800)
A follow-up patch will require to have all interrupts routed to the
hardware registered before calling prepare_dtb/prepare_acpi.

At the moment, it is not necessary to call platform specific mappings
(gic and platform) after, so it is fine to move them.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/domain_build.c

index 941688a2ceec5fb222e3784fe497788bce8d5fb1..a5e5c8235584c552498c64504743fa4e695ed84b 100644 (file)
@@ -2145,14 +2145,6 @@ int construct_dom0(struct domain *d)
     allocate_memory(d, &kinfo);
     find_gnttab_region(d, &kinfo);
 
-    if ( acpi_disabled )
-        rc = prepare_dtb(d, &kinfo);
-    else
-        rc = prepare_acpi(d, &kinfo);
-
-    if ( rc < 0 )
-        return rc;
-
     /* Map extra GIC MMIO, irqs and other hw stuffs to dom0. */
     rc = gic_map_hwdom_extra_mappings(d);
     if ( rc < 0 )
@@ -2162,6 +2154,14 @@ int construct_dom0(struct domain *d)
     if ( rc < 0 )
         return rc;
 
+    if ( acpi_disabled )
+        rc = prepare_dtb(d, &kinfo);
+    else
+        rc = prepare_acpi(d, &kinfo);
+
+    if ( rc < 0 )
+        return rc;
+
     /*
      * The following loads use the domain's p2m and require current to
      * be a vcpu of the domain, temporarily switch