]> git.openpandora.org Git - pandora-kernel.git/commitdiff
xen/events: Support event channel rebind on ARM
authorJulien Grall <julien.grall@citrix.com>
Tue, 28 Jul 2015 09:10:42 +0000 (10:10 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Thu, 20 Aug 2015 11:24:15 +0000 (12:24 +0100)
Currently, the event channel rebind code is gated with the presence of
the vector callback.

The virtual interrupt controller on ARM has the concept of per-CPU
interrupt (PPI) which allow us to support per-VCPU event channel.
Therefore there is no need of vector callback for ARM.

Xen is already using a free PPI to notify the guest VCPU of an event.
Furthermore, the xen code initialization in Linux (see
arch/arm/xen/enlighten.c) is requesting correctly a per-CPU IRQ.

Introduce new helper xen_support_evtchn_rebind to allow architecture
decide whether rebind an event is support or not. It will always return
true on ARM and keep the same behavior on x86.

This is also allow us to drop the usage of xen_have_vector_callback
entirely in the ARM code.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
arch/arm/include/asm/xen/events.h
arch/arm/xen/enlighten.c
arch/arm64/include/asm/xen/events.h
arch/x86/include/asm/xen/events.h
drivers/xen/events/events_base.c
include/xen/events.h

index 8b1f37bfeeecf3c2d8af09ed15bcbc4cc8fa991f..71e473d05fcce8a2b869b84272dfcd498c3847dc 100644 (file)
@@ -20,4 +20,10 @@ static inline int xen_irqs_disabled(struct pt_regs *regs)
                                                            atomic64_t, \
                                                            counter), (val))
 
+/* Rebind event channel is supported by default */
+static inline bool xen_support_evtchn_rebind(void)
+{
+       return true;
+}
+
 #endif /* _ASM_ARM_XEN_EVENTS_H */
index 6c09cc440a2b24c4c0acfbd3027c74f9a1dc9efe..40b961d8e953c9ba05a998a4a538a893cc18d98a 100644 (file)
@@ -45,10 +45,6 @@ static struct vcpu_info __percpu *xen_vcpu_info;
 unsigned long xen_released_pages;
 struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initdata;
 
-/* TODO: to be removed */
-__read_mostly int xen_have_vector_callback;
-EXPORT_SYMBOL_GPL(xen_have_vector_callback);
-
 int xen_platform_pci_unplug = XEN_UNPLUG_ALL;
 EXPORT_SYMBOL_GPL(xen_platform_pci_unplug);
 
index 86553213c1322cafd3ca816e8e6e6a762c2bbe3d..4318866d053c513738c5fb3194652ceaf2a7770a 100644 (file)
@@ -18,4 +18,10 @@ static inline int xen_irqs_disabled(struct pt_regs *regs)
 
 #define xchg_xen_ulong(ptr, val) xchg((ptr), (val))
 
+/* Rebind event channel is supported by default */
+static inline bool xen_support_evtchn_rebind(void)
+{
+       return true;
+}
+
 #endif /* _ASM_ARM64_XEN_EVENTS_H */
Simple merge
Simple merge
Simple merge