From 13febc84849d4f14a088fe3b09111bdb1951ab42 Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Thu, 13 Sep 2012 17:28:06 +0000 Subject: xen: do not compile manage, balloon, pci, acpi, pcpu and cpu_hotplug on ARM Changes in v4: - compile pcpu only on x86; - use "+=" instead of ":=" for dom0- targets. Changes in v2: - make pci.o depend on CONFIG_PCI and acpi.o depend on CONFIG_ACPI. Signed-off-by: Stefano Stabellini Acked-by: Konrad Rzeszutek Wilk --- drivers/xen/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'drivers/xen') diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile index d80bea5535a..cd28aae575d 100644 --- a/drivers/xen/Makefile +++ b/drivers/xen/Makefile @@ -1,11 +1,18 @@ -obj-y += grant-table.o features.o events.o manage.o balloon.o +ifneq ($(CONFIG_ARM),y) +obj-y += manage.o balloon.o +obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o +endif +obj-y += grant-table.o features.o events.o obj-y += xenbus/ nostackp := $(call cc-option, -fno-stack-protector) CFLAGS_features.o := $(nostackp) +obj-$(CONFIG_XEN_DOM0) += $(dom0-y) +dom0-$(CONFIG_PCI) += pci.o +dom0-$(CONFIG_ACPI) += acpi.o +dom0-$(CONFIG_X86) += pcpu.o obj-$(CONFIG_BLOCK) += biomerge.o -obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o obj-$(CONFIG_XEN_XENCOMM) += xencomm.o obj-$(CONFIG_XEN_BALLOON) += xen-balloon.o obj-$(CONFIG_XEN_SELFBALLOONING) += xen-selfballoon.o @@ -17,8 +24,6 @@ obj-$(CONFIG_XEN_SYS_HYPERVISOR) += sys-hypervisor.o obj-$(CONFIG_XEN_PVHVM) += platform-pci.o obj-$(CONFIG_XEN_TMEM) += tmem.o obj-$(CONFIG_SWIOTLB_XEN) += swiotlb-xen.o -obj-$(CONFIG_XEN_DOM0) += pcpu.o -obj-$(CONFIG_XEN_DOM0) += pci.o acpi.o obj-$(CONFIG_XEN_MCE_LOG) += mcelog.o obj-$(CONFIG_XEN_PCIDEV_BACKEND) += xen-pciback/ obj-$(CONFIG_XEN_PRIVCMD) += xen-privcmd.o -- cgit v1.2.3 From 0ec53ecf38bcbf95b4b057328a8fbba4d22ef28b Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Fri, 14 Sep 2012 13:37:32 +0000 Subject: xen/arm: receive Xen events on ARM Compile events.c on ARM. Parse, map and enable the IRQ to get event notifications from the device tree (node "/xen"). Signed-off-by: Stefano Stabellini Acked-by: Konrad Rzeszutek Wilk --- drivers/xen/events.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'drivers/xen') diff --git a/drivers/xen/events.c b/drivers/xen/events.c index c60d1629c91..8672211555b 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -31,14 +31,16 @@ #include #include +#ifdef CONFIG_X86 #include #include #include #include #include -#include #include #include +#endif +#include #include #include @@ -50,6 +52,9 @@ #include #include #include +#include +#include +#include /* * This lock protects updates to the following mapping and reference-count @@ -1386,7 +1391,9 @@ void xen_evtchn_do_upcall(struct pt_regs *regs) { struct pt_regs *old_regs = set_irq_regs(regs); +#ifdef CONFIG_X86 exit_idle(); +#endif irq_enter(); __xen_evtchn_do_upcall(); @@ -1795,9 +1802,9 @@ void xen_callback_vector(void) void xen_callback_vector(void) {} #endif -void __init xen_init_IRQ(void) +void xen_init_IRQ(void) { - int i, rc; + int i; evtchn_to_irq = kcalloc(NR_EVENT_CHANNELS, sizeof(*evtchn_to_irq), GFP_KERNEL); @@ -1813,6 +1820,7 @@ void __init xen_init_IRQ(void) pirq_needs_eoi = pirq_needs_eoi_flag; +#ifdef CONFIG_X86 if (xen_hvm_domain()) { xen_callback_vector(); native_init_IRQ(); @@ -1820,6 +1828,7 @@ void __init xen_init_IRQ(void) * __acpi_register_gsi can point at the right function */ pci_xen_hvm_init(); } else { + int rc; struct physdev_pirq_eoi_gmfn eoi_gmfn; irq_ctx_init(smp_processor_id()); @@ -1835,4 +1844,6 @@ void __init xen_init_IRQ(void) } else pirq_needs_eoi = pirq_check_eoi_map; } +#endif } +EXPORT_SYMBOL_GPL(xen_init_IRQ); -- cgit v1.2.3