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
config ARM
def_bool y
+ select HAS_DEVICE_TREE
select HAS_PASSTHROUGH
config ARCH_DEFCONFIG
# 'make clean' before rebuilding.
#
-HAS_DEVICE_TREE := y
HAS_VIDEO := y
HAS_ARM_HDLCD := y
HAS_PDX := y
menu "Common Features"
+# Select HAS_DEVICE_TREE if device tree is supported
+config HAS_DEVICE_TREE
+ bool
+
endmenu
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
subdir-$(coverage) += gcov
subdir-y += libelf
-subdir-$(HAS_DEVICE_TREE) += libfdt
+subdir-$(CONFIG_HAS_DEVICE_TREE) += libfdt
#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
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)
{
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
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
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;
/* 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
#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);
#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);
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);
}
#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)
{
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
}
#endif
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
static inline int xsm_dt_init(void)
{
return 0;
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);
}
#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;
.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,
}
#endif
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
int __init xsm_dt_init(void)
{
int ret = 0;
#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
}
#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);