From: Isaku Yamahata Date: Wed, 2 Apr 2008 17:53:57 +0000 (-0700) Subject: xen: add resend_irq_on_evtchn() definition into events.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=642e0c882cd5369429c833d97e4804c8be473e8a;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git xen: add resend_irq_on_evtchn() definition into events.c Define resend_irq_on_evtchn() which ia64/xen uses. Although it isn't used by current x86/xen code, it's arch generic so that put it into common code. Signed-off-by: Isaku Yamahata Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 2396b4492f70..4f0f22b020ea 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -586,6 +586,22 @@ static void set_affinity_irq(unsigned irq, cpumask_t dest) rebind_irq_to_cpu(irq, tcpu); } +int resend_irq_on_evtchn(unsigned int irq) +{ + int masked, evtchn = evtchn_from_irq(irq); + struct shared_info *s = HYPERVISOR_shared_info; + + if (!VALID_EVTCHN(evtchn)) + return 1; + + masked = sync_test_and_set_bit(evtchn, s->evtchn_mask); + sync_set_bit(evtchn, s->evtchn_pending); + if (!masked) + unmask_evtchn(evtchn); + + return 1; +} + static void enable_dynirq(unsigned int irq) { int evtchn = evtchn_from_irq(irq); diff --git a/include/xen/events.h b/include/xen/events.h index d99a3e0df880..acd8e062c85f 100644 --- a/include/xen/events.h +++ b/include/xen/events.h @@ -31,6 +31,7 @@ int bind_ipi_to_irqhandler(enum ipi_vector ipi, void unbind_from_irqhandler(unsigned int irq, void *dev_id); void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector); +int resend_irq_on_evtchn(unsigned int irq); static inline void notify_remote_via_evtchn(int port) {