Commit d4c045364d3107603187f21a56ec231e74d26441

Authored by Ian Campbell
Committed by Jeremy Fitzhardinge
1 parent 6d02c42698

xen: add irq_from_evtchn

Given an evtchn, return the corresponding irq.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

Showing 2 changed files with 9 additions and 0 deletions Side-by-side Diff

drivers/xen/events.c
... ... @@ -151,6 +151,12 @@
151 151 return info_for_irq(irq)->evtchn;
152 152 }
153 153  
  154 +unsigned irq_from_evtchn(unsigned int evtchn)
  155 +{
  156 + return evtchn_to_irq[evtchn];
  157 +}
  158 +EXPORT_SYMBOL_GPL(irq_from_evtchn);
  159 +
154 160 static enum ipi_vector ipi_from_irq(unsigned irq)
155 161 {
156 162 struct irq_info *info = info_for_irq(irq);
include/xen/events.h
... ... @@ -53,5 +53,8 @@
53 53 irq will be disabled so it won't deliver an interrupt. */
54 54 void xen_poll_irq(int irq);
55 55  
  56 +/* Determine the IRQ which is bound to an event channel */
  57 +unsigned irq_from_evtchn(unsigned int evtchn);
  58 +
56 59 #endif /* _XEN_EVENTS_H */