]> xenbits.xensource.com Git - people/julieng/xen-unstable.git/commitdiff
build: convert HAS_DEVICE_TREE use to Kconfig
authorDoug Goldstein <cardoe@cardoe.com>
Tue, 15 Dec 2015 13:14:00 +0000 (14:14 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 16 Dec 2015 16:43:24 +0000 (17:43 +0100)
Use the Kconfig generated CONFIG_HAS_DEVICE_TREE defines in the code
base.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
17 files changed:
xen/Rules.mk
xen/arch/arm/Kconfig
xen/arch/arm/Rules.mk
xen/common/Kconfig
xen/common/Makefile
xen/drivers/char/ns16550.c
xen/drivers/passthrough/Makefile
xen/drivers/passthrough/iommu.c
xen/include/asm-arm/device.h
xen/include/xen/hvm/iommu.h
xen/include/xen/iommu.h
xen/include/xsm/dummy.h
xen/include/xsm/xsm.h
xen/xsm/dummy.c
xen/xsm/flask/hooks.c
xen/xsm/xsm_core.c
xen/xsm/xsm_policy.c

index a8221475dfe0930683c9f7111985ab952b4c48ad..10e0b9d7fd727e95f501ff498fc83a07d1c447c5 100644 (file)
@@ -58,7 +58,6 @@ CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
 CFLAGS-$(HAS_ACPI)      += -DHAS_ACPI
 CFLAGS-$(HAS_GDBSX)     += -DHAS_GDBSX
-CFLAGS-$(HAS_DEVICE_TREE) += -DHAS_DEVICE_TREE
 CFLAGS-$(HAS_MEM_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
 CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
index 0fd69a72ba77a8d769329cb5b2da411f06b7ee39..93e64f66970d0a280ff11a58414dbdfcb9ca0623 100644 (file)
@@ -16,6 +16,7 @@ config ARM_64
 
 config ARM
        def_bool y
+       select HAS_DEVICE_TREE
        select HAS_PASSTHROUGH
 
 config ARCH_DEFCONFIG
index 86d7b81e81289be07ba012aff0eae02682cac878..4725374aa6a43a5220078b52b60365cf290ec800 100644 (file)
@@ -6,7 +6,6 @@
 # 'make clean' before rebuilding.
 #
 
-HAS_DEVICE_TREE := y
 HAS_VIDEO := y
 HAS_ARM_HDLCD := y
 HAS_PDX := y
index 0251856777ea47d865aed2069451931fb3d3a108..53ca33fdaa7d12006ef93879628ff1663306415f 100644 (file)
@@ -1,4 +1,8 @@
 
 menu "Common Features"
 
+# Select HAS_DEVICE_TREE if device tree is supported
+config HAS_DEVICE_TREE
+       bool
+
 endmenu
index 3547c8e2ce433ca78a468423df69e6bbce70d7b2..5dc2bb288c24fe8a0772bb159a873bdb06742bf5 100644 (file)
@@ -2,7 +2,7 @@ obj-y += bitmap.o
 obj-$(HAS_CORE_PARKING) += core_parking.o
 obj-y += cpu.o
 obj-y += cpupool.o
-obj-$(HAS_DEVICE_TREE) += device_tree.o
+obj-$(CONFIG_HAS_DEVICE_TREE) += device_tree.o
 obj-y += domctl.o
 obj-y += domain.o
 obj-y += event_2l.o
@@ -70,4 +70,4 @@ subdir-$(x86_64) += hvm
 subdir-$(coverage) += gcov
 
 subdir-y += libelf
-subdir-$(HAS_DEVICE_TREE) += libfdt
+subdir-$(CONFIG_HAS_DEVICE_TREE) += libfdt
index 09abca8a0f0312ed81a8d0b444408579e63736de..e96e07227ec604e703aa2e6611274838da49a7ff 100644 (file)
@@ -24,7 +24,7 @@
 #include <xen/8250-uart.h>
 #include <xen/vmap.h>
 #include <asm/io.h>
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 #include <asm/device.h>
 #endif
 #ifdef CONFIG_X86
@@ -1131,7 +1131,7 @@ void __init ns16550_init(int index, struct ns16550_defaults *defaults)
     ns16550_parse_port_config(uart, (index == 0) ? opt_com1 : opt_com2);
 }
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
                                        const void *data)
 {
index 16e9027a32dd5d5b55b786f44a30351d307688fa..2bb5afb3d473012cc44a0d8de1f1818cc5b2df34 100644 (file)
@@ -6,4 +6,4 @@ subdir-$(arm) += arm
 obj-y += iommu.o
 obj-$(x86) += io.o
 obj-$(HAS_PCI) += pci.o
-obj-$(HAS_DEVICE_TREE) += device_tree.o
+obj-$(CONFIG_HAS_DEVICE_TREE) += device_tree.o
index 3d02550f731f059c96cf262bcf07977f5e2444a8..8bb7df04c0ba145e443b14bcbc508e0e1734f1b4 100644 (file)
@@ -357,7 +357,7 @@ int iommu_do_domctl(
     ret = iommu_do_pci_domctl(domctl, d, u_domctl);
 #endif
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
     if ( ret == -ENODEV )
         ret = iommu_do_dt_domctl(domctl, d, u_domctl);
 #endif
index 5d0a4cd14bcf250936d583c60c4799f7f82ed430..b455bdf30ff0869e78ce038b73952446f1712589 100644 (file)
@@ -16,7 +16,7 @@ struct dev_archdata {
 struct device
 {
     enum device_type type;
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
     struct dt_device_node *of_node; /* Used by drivers imported from Linux */
 #endif
     struct dev_archdata archdata;
index 106e08f104061e86c5058088f8750b79059d3557..c817eece86d5fb88c764b684040c777c23bebeb6 100644 (file)
@@ -29,7 +29,7 @@ struct hvm_iommu {
     /* iommu_ops */
     const struct iommu_ops *platform_ops;
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
     /* List of DT devices assigned to this domain */
     struct list_head dt_devices;
 #endif
index 1f5d04a2430ba7d3b78493280ab0e950b541f772..ac9b7f872c581058ea8db55cdb4ec256f695475d 100644 (file)
@@ -109,7 +109,7 @@ void iommu_read_msi_from_ire(struct msi_desc *msi_desc, struct msi_msg *msg);
 #define PT_IRQ_TIME_OUT MILLISECS(8)
 #endif /* HAS_PCI */
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 #include <xen/device_tree.h>
 
 int iommu_assign_dt_device(struct domain *d, struct dt_device_node *dev);
index 50b94a1457e17c2441d8f1642322c3140dd0e401..c7de16514dbdc7fd67976728549dfde5fe85cd4c 100644 (file)
@@ -350,7 +350,7 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint
 
 #endif /* HAS_PASSTHROUGH && HAS_PCI */
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
 static XSM_INLINE int xsm_test_assign_dtdevice(XSM_DEFAULT_ARG const char *dtpath)
 {
     XSM_ASSERT_ACTION(XSM_HOOK);
index e5cb088c340d09f21eec8ba5b94a0f86c606f116..6ebb0e015e1d2fdb7ec07713c653b3fd6ddfceea 100644 (file)
@@ -121,7 +121,7 @@ struct xsm_operations {
     int (*deassign_device) (struct domain *d, uint32_t machine_bdf);
 #endif
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
     int (*test_assign_dtdevice) (const char *dtpath);
     int (*assign_dtdevice) (struct domain *d, const char *dtpath);
     int (*deassign_dtdevice) (struct domain *d, const char *dtpath);
@@ -491,7 +491,7 @@ static inline int xsm_deassign_device(xsm_default_t def, struct domain *d, uint3
 }
 #endif /* HAS_PASSTHROUGH && HAS_PCI) */
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
 static inline int xsm_assign_dtdevice(xsm_default_t def, struct domain *d,
                                       const char *dtpath)
 {
@@ -741,7 +741,7 @@ extern int xsm_multiboot_policy_init(unsigned long *module_map,
                                      void *(*bootstrap_map)(const module_t *));
 #endif
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 extern int xsm_dt_init(void);
 extern int xsm_dt_policy_init(void);
 #endif
@@ -765,7 +765,7 @@ static inline int xsm_multiboot_init (unsigned long *module_map,
 }
 #endif
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 static inline int xsm_dt_init(void)
 {
     return 0;
index 036db4b1fa6f4f41226b7f2251619650951ad287..a380da3b50dba9633d353163e693ba202524426a 100644 (file)
@@ -96,7 +96,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     set_to_dummy_if_null(ops, deassign_device);
 #endif
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
     set_to_dummy_if_null(ops, test_assign_dtdevice);
     set_to_dummy_if_null(ops, assign_dtdevice);
     set_to_dummy_if_null(ops, deassign_dtdevice);
index 3f4ceea87af9c7a2b89aa7f46504e6fff2467874..2650cc88cef6422d9f16289d69ed3c342932c4cf 100644 (file)
@@ -1279,7 +1279,7 @@ static int flask_deassign_device(struct domain *d, uint32_t machine_bdf)
 }
 #endif /* HAS_PASSTHROUGH && HAS_PCI */
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
 static int flask_test_assign_dtdevice(const char *dtpath)
 {
     u32 rsid;
@@ -1732,7 +1732,7 @@ static struct xsm_operations flask_ops = {
     .deassign_device = flask_deassign_device,
 #endif
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
     .test_assign_dtdevice = flask_test_assign_dtdevice,
     .assign_dtdevice = flask_assign_dtdevice,
     .deassign_dtdevice = flask_deassign_dtdevice,
index 0ac6d0330d341acd51afe34129d9c641d28f11f9..2a74496b8eb69ef892e3765926c59182680a48f0 100644 (file)
@@ -85,7 +85,7 @@ int __init xsm_multiboot_init(unsigned long *module_map,
 }
 #endif
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 int __init xsm_dt_init(void)
 {
     int ret = 0;
index 6e0bb78df4c7307b4c800089055114d57bd2265a..b60d822dabb19993aa6092b180a7e7ea6fcd9b47 100644 (file)
@@ -23,7 +23,7 @@
 #include <xen/multiboot.h>
 #endif
 #include <xen/bitops.h>
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 # include <asm/setup.h>
 # include <xen/device_tree.h>
 #endif
@@ -74,7 +74,7 @@ int __init xsm_multiboot_policy_init(unsigned long *module_map,
 }
 #endif
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 int __init xsm_dt_policy_init(void)
 {
     struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_XSM);