diff options
-rw-r--r-- | drivers/xen/events/events_base.c | 17 | ||||
-rw-r--r-- | include/xen/events.h | 5 |
2 files changed, 22 insertions, 0 deletions
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index 9d0d88cf74af..e9001fef4ffd 100644 --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c | |||
@@ -1117,6 +1117,23 @@ void unbind_from_irqhandler(unsigned int irq, void *dev_id) | |||
1117 | } | 1117 | } |
1118 | EXPORT_SYMBOL_GPL(unbind_from_irqhandler); | 1118 | EXPORT_SYMBOL_GPL(unbind_from_irqhandler); |
1119 | 1119 | ||
1120 | /** | ||
1121 | * xen_set_irq_priority() - set an event channel priority. | ||
1122 | * @irq:irq bound to an event channel. | ||
1123 | * @priority: priority between XEN_IRQ_PRIORITY_MAX and XEN_IRQ_PRIORITY_MIN. | ||
1124 | */ | ||
1125 | int xen_set_irq_priority(unsigned irq, unsigned priority) | ||
1126 | { | ||
1127 | struct evtchn_set_priority set_priority; | ||
1128 | |||
1129 | set_priority.port = evtchn_from_irq(irq); | ||
1130 | set_priority.priority = priority; | ||
1131 | |||
1132 | return HYPERVISOR_event_channel_op(EVTCHNOP_set_priority, | ||
1133 | &set_priority); | ||
1134 | } | ||
1135 | EXPORT_SYMBOL_GPL(xen_set_irq_priority); | ||
1136 | |||
1120 | int evtchn_make_refcounted(unsigned int evtchn) | 1137 | int evtchn_make_refcounted(unsigned int evtchn) |
1121 | { | 1138 | { |
1122 | int irq = get_evtchn_to_irq(evtchn); | 1139 | int irq = get_evtchn_to_irq(evtchn); |
diff --git a/include/xen/events.h b/include/xen/events.h index 55b42cc997f6..c9c85cf84895 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -39,6 +39,11 @@ int bind_interdomain_evtchn_to_irqhandler(unsigned int remote_domain, | |||
39 | */ | 39 | */ |
40 | void unbind_from_irqhandler(unsigned int irq, void *dev_id); | 40 | void unbind_from_irqhandler(unsigned int irq, void *dev_id); |
41 | 41 | ||
42 | #define XEN_IRQ_PRIORITY_MAX EVTCHN_FIFO_PRIORITY_MAX | ||
43 | #define XEN_IRQ_PRIORITY_DEFAULT EVTCHN_FIFO_PRIORITY_DEFAULT | ||
44 | #define XEN_IRQ_PRIORITY_MIN EVTCHN_FIFO_PRIORITY_MIN | ||
45 | int xen_set_irq_priority(unsigned irq, unsigned priority); | ||
46 | |||
42 | /* | 47 | /* |
43 | * Allow extra references to event channels exposed to userspace by evtchn | 48 | * Allow extra references to event channels exposed to userspace by evtchn |
44 | */ | 49 | */ |