[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v8 27/28] build: convert HAS_GICV3 use to Kconfig



Use the Kconfig generated CONFIG_HAS_GICV3 defines in the code base.

CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
Signed-off-by: Doug Goldstein <cardoe@xxxxxxxxxx>
---
 config/arm64.mk              | 2 --
 xen/arch/arm/Kconfig         | 5 +++++
 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 ++--
 xen/include/asm-arm/vgic.h   | 2 +-
 8 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/config/arm64.mk b/config/arm64.mk
index 4b8fdf6..5a8e534 100644
--- a/config/arm64.mk
+++ b/config/arm64.mk
@@ -6,8 +6,6 @@ CONFIG_XEN_INSTALL_SUFFIX :=
 
 CFLAGS += #-marm -march= -mcpu= etc
 
-HAS_GICV3 := y
-
 # Use only if calling $(LD) directly.
 LDFLAGS_DIRECT += -EL
 
diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index ec176a6..2cab17b 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -13,6 +13,7 @@ config ARM_32
 config ARM_64
        def_bool y
        depends on 64BIT
+       select HAS_GICV3
 
 config ARM
        def_bool y
@@ -30,6 +31,10 @@ config ARCH_DEFCONFIG
 
 menu "Architecture Features"
 
+# Select HAS_GICV3 if GICv3 is supported
+config HAS_GICV3
+       bool
+
 endmenu
 
 source "common/Kconfig"
diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index 4ac5edd..2f050f5 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-$(HAS_GICV3) += gic-v3.o
+obj-$(CONFIG_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 2158bd8..4947e64 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -32,8 +32,6 @@ 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 531ce5d..ee35683 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -103,7 +103,7 @@ int domain_vgic_init(struct domain *d, unsigned int nr_spis)
 
     switch ( d->arch.vgic.version )
     {
-#ifdef HAS_GICV3
+#ifdef CONFIG_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 e7e40da..aa7f283 100644
--- a/xen/include/asm-arm/domain.h
+++ b/xen/include/asm-arm/domain.h
@@ -102,7 +102,7 @@ struct arch_domain
         struct pending_irq *pending_irqs;
         /* Base address for guest GIC */
         paddr_t dbase; /* Distributor base address */
-#ifdef HAS_GICV3
+#ifdef CONFIG_HAS_GICV3
         /* GIC V3 addressing */
         /* List of contiguous occupied by the redistributors */
         struct vgic_rdist_region {
diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
index 42a2eec..28935a3 100644
--- a/xen/include/asm-arm/gic.h
+++ b/xen/include/asm-arm/gic.h
@@ -167,7 +167,7 @@
 
 #define DT_MATCH_GIC_V3 DT_MATCH_COMPATIBLE("arm,gic-v3")
 
-#ifdef HAS_GICV3
+#ifdef CONFIG_HAS_GICV3
 /*
  * GICv3 registers that needs to be saved/restored
  */
@@ -195,7 +195,7 @@ struct gic_v2 {
  */
 union gic_state_data {
     struct gic_v2 v2;
-#ifdef HAS_GICV3
+#ifdef CONFIG_HAS_GICV3
     struct gic_v3 v3;
 #endif
 };
diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h
index 005f822..a2fccc0 100644
--- a/xen/include/asm-arm/vgic.h
+++ b/xen/include/asm-arm/vgic.h
@@ -336,7 +336,7 @@ extern void vgic_free_virq(struct domain *d, unsigned int 
virq);
 void vgic_v2_setup_hw(paddr_t dbase, paddr_t cbase, paddr_t csize,
                       paddr_t vbase, uint32_t aliased_offset);
 
-#ifdef HAS_GICV3
+#ifdef CONFIG_HAS_GICV3
 struct rdist_region;
 void vgic_v3_setup_hw(paddr_t dbase,
                       unsigned int nr_rdist_regions,
-- 
2.4.10


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.