Message ID | 20180227151555.1953-2-julien.grall@arm.com |
---|---|
State | New |
Headers | show |
Series | xen/arm: Rework the way to allocate event channel IRQ for hwdom | expand |
On Tue, 27 Feb 2018, julien.grall@arm.com wrote: > From: Julien Grall <julien.grall@arm.com> > > 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 | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > 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 > -- > 2.11.0 >
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