diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2009-02-06 22:20:31 -0500 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2009-03-30 12:26:49 -0400 |
commit | d4c045364d3107603187f21a56ec231e74d26441 (patch) | |
tree | b182dcd46168c14f4a97f5c891b8ea1fe51008d1 | |
parent | 6d02c42698f99eccb290ac53d4f10ca883b9f90c (diff) |
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>
-rw-r--r-- | drivers/xen/events.c | 6 | ||||
-rw-r--r-- | include/xen/events.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 30963af5dba0..1cd2a0e15ae8 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -151,6 +151,12 @@ static unsigned int evtchn_from_irq(unsigned irq) | |||
151 | return info_for_irq(irq)->evtchn; | 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 | static enum ipi_vector ipi_from_irq(unsigned irq) | 160 | static enum ipi_vector ipi_from_irq(unsigned irq) |
155 | { | 161 | { |
156 | struct irq_info *info = info_for_irq(irq); | 162 | struct irq_info *info = info_for_irq(irq); |
diff --git a/include/xen/events.h b/include/xen/events.h index 0d5f1adc0363..e68d59a90ca8 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -53,4 +53,7 @@ bool xen_test_irq_pending(int irq); | |||
53 | irq will be disabled so it won't deliver an interrupt. */ | 53 | irq will be disabled so it won't deliver an interrupt. */ |
54 | void xen_poll_irq(int irq); | 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 | #endif /* _XEN_EVENTS_H */ | 59 | #endif /* _XEN_EVENTS_H */ |