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/events.c') 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