[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 5/8] xen/arm: vgic-v2: Drop cbase from arch_domain
The field value is only used within a single function in the vgic-v2 emulation. So it's not necessary to store the value in the domain structure. This is also saving 8 bytes on a structure which begin to be constrained (the maximum size of struct domain is 4KB). Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> --- xen/arch/arm/vgic-v2.c | 11 ++++++----- xen/include/asm-arm/domain.h | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c index fa71598..ecd6bf3 100644 --- a/xen/arch/arm/vgic-v2.c +++ b/xen/arch/arm/vgic-v2.c @@ -546,6 +546,7 @@ static int vgic_v2_vcpu_init(struct vcpu *v) static int vgic_v2_domain_init(struct domain *d) { int i, ret; + paddr_t cbase; /* * The hardware domain gets the hardware address. @@ -554,12 +555,12 @@ static int vgic_v2_domain_init(struct domain *d) if ( is_hardware_domain(d) ) { d->arch.vgic.dbase = vgic_v2_hw.dbase; - d->arch.vgic.cbase = vgic_v2_hw.cbase; + cbase = vgic_v2_hw.cbase; } else { d->arch.vgic.dbase = GUEST_GICD_BASE; - d->arch.vgic.cbase = GUEST_GICC_BASE; + cbase = GUEST_GICC_BASE; } /* @@ -569,16 +570,16 @@ static int vgic_v2_domain_init(struct domain *d) * The second page is always mapped at +4K irrespective of the * GIC_64K_STRIDE quirk. The DTB passed to the guest reflects this. */ - ret = map_mmio_regions(d, paddr_to_pfn(d->arch.vgic.cbase), 1, + ret = map_mmio_regions(d, paddr_to_pfn(cbase), 1, paddr_to_pfn(vgic_v2_hw.vbase)); if ( ret ) return ret; if ( !platform_has_quirk(PLATFORM_QUIRK_GIC_64K_STRIDE) ) - ret = map_mmio_regions(d, paddr_to_pfn(d->arch.vgic.cbase + PAGE_SIZE), + ret = map_mmio_regions(d, paddr_to_pfn(cbase + PAGE_SIZE), 1, paddr_to_pfn(vgic_v2_hw.vbase + PAGE_SIZE)); else - ret = map_mmio_regions(d, paddr_to_pfn(d->arch.vgic.cbase + PAGE_SIZE), + ret = map_mmio_regions(d, paddr_to_pfn(cbase + PAGE_SIZE), 1, paddr_to_pfn(vgic_v2_hw.vbase + SZ_64K)); if ( ret ) diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h index c3f5a95..ba430a7 100644 --- a/xen/include/asm-arm/domain.h +++ b/xen/include/asm-arm/domain.h @@ -101,7 +101,6 @@ struct arch_domain struct pending_irq *pending_irqs; /* Base address for guest GIC */ paddr_t dbase; /* Distributor base address */ - paddr_t cbase; /* CPU base address */ #ifdef HAS_GICV3 /* GIC V3 addressing */ /* List of contiguous occupied by the redistributors */ -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |