diff options
author | David Vrabel <david.vrabel@citrix.com> | 2013-09-23 07:47:26 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2014-01-06 10:07:54 -0500 |
commit | 6ccecb0fbc0494c7221459e6358a016f3281a0ca (patch) | |
tree | 773bff549aca665df8b61825c3ef919f179a9acd /drivers/xen/events | |
parent | bf2bbe07f13846a90d4447521d87566d6f87bc0e (diff) |
xen/events: allow event channel priority to be set
Add xen_irq_set_priority() to set an event channels priority. This function
will only work with event channel ABIs that support priority (i.e., the
FIFO-based ABI).
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'drivers/xen/events')
-rw-r--r-- | drivers/xen/events/events_base.c | 17 |
1 files changed, 17 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); |