[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 01/15] xen/arm: Gate GICv3 change with HAS_GICV3 rather than CONFIG_ARM_64...
for clarity and it will be easier to understand some follow-up patches. Also gate gic_v3 structure is HAS_GICV3. Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> --- Changes in v2: - Patch added --- config/arm64.mk | 1 + xen/arch/arm/Makefile | 2 +- xen/arch/arm/Rules.mk | 2 ++ xen/arch/arm/vgic.c | 2 +- xen/include/asm-arm/domain.h | 2 +- xen/include/asm-arm/gic.h | 4 ++++ 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config/arm64.mk b/config/arm64.mk index e24c1d1..c5deb4e 100644 --- a/config/arm64.mk +++ b/config/arm64.mk @@ -10,6 +10,7 @@ HAS_PL011 := y HAS_CADENCE_UART := y HAS_NS16550 := y HAS_MEM_ACCESS := y +HAS_GICV3 := y # Use only if calling $(LD) directly. LDFLAGS_DIRECT += -EL diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 935999e..1ef39f7 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -13,7 +13,7 @@ obj-y += sysctl.o obj-y += domain_build.o obj-y += gic.o gic-v2.o obj-$(CONFIG_ARM_32) += gic-hip04.o -obj-$(CONFIG_ARM_64) += gic-v3.o +obj-$(HAS_GICV3) += gic-v3.o obj-y += io.o obj-y += irq.o obj-y += kernel.o diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk index e27f573..b31770c 100644 --- a/xen/arch/arm/Rules.mk +++ b/xen/arch/arm/Rules.mk @@ -38,6 +38,8 @@ ifneq ($(call cc-option,$(CC),-fvisibility=hidden,n),n) CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE endif +CFLAGS-$(HAS_GICV3) += -DHAS_GICV3 + EARLY_PRINTK := n ifeq ($(debug),y) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index 73a6f7e..dfd959a 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -82,7 +82,7 @@ int domain_vgic_init(struct domain *d, unsigned int nr_spis) switch ( gic_hw_version() ) { -#ifdef CONFIG_ARM_64 +#ifdef HAS_GICV3 case GIC_V3: if ( vgic_v3_init(d) ) return -ENODEV; diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h index f1a087e..96607d5 100644 --- a/xen/include/asm-arm/domain.h +++ b/xen/include/asm-arm/domain.h @@ -101,7 +101,7 @@ struct arch_domain /* Base address for guest GIC */ paddr_t dbase; /* Distributor base address */ paddr_t cbase; /* CPU base address */ -#ifdef CONFIG_ARM_64 +#ifdef HAS_GICV3 /* GIC V3 addressing */ paddr_t dbase_size; /* Distributor base size */ /* List of contiguous occupied by the redistributors */ diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h index 9e2acb7..f0dcfa1 100644 --- a/xen/include/asm-arm/gic.h +++ b/xen/include/asm-arm/gic.h @@ -162,6 +162,7 @@ #define DT_MATCH_GIC_V3 DT_MATCH_COMPATIBLE("arm,gic-v3") +#ifdef HAS_GICV3 /* * GICv3 registers that needs to be saved/restored */ @@ -171,6 +172,7 @@ struct gic_v3 { uint32_t apr1[4]; uint64_t lr[16]; }; +#endif /* * GICv2 register that needs to be saved/restored @@ -188,7 +190,9 @@ struct gic_v2 { */ union gic_state_data { struct gic_v2 v2; +#ifdef HAS_GICV3 struct gic_v3 v3; +#endif }; /* -- 2.4.3 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |