From: Julien Grall Date: Tue, 27 Feb 2018 15:15:53 +0000 (+0000) Subject: xen/arm: domain_build: Prepare DTB/ACPI tables after specific mappings X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~481 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3559ac583beadd9325363e972d17f60693c20a7e;p=xen.git xen/arm: domain_build: Prepare DTB/ACPI tables after specific mappings 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 Reviewed-by: Stefano Stabellini --- diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 941688a2ce..a5e5c82355 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -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