]>
Commit | Line | Data |
---|---|---|
e46cdb66 JF |
1 | #ifndef _XEN_EVENTS_H |
2 | #define _XEN_EVENTS_H | |
3 | ||
4 | #include <linux/irq.h> | |
5 | ||
6 | int bind_evtchn_to_irqhandler(unsigned int evtchn, | |
7 | irqreturn_t (*handler)(int, void *), | |
8 | unsigned long irqflags, const char *devname, | |
9 | void *dev_id); | |
10 | int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, | |
11 | irqreturn_t (*handler)(int, void *), | |
12 | unsigned long irqflags, const char *devname, void *dev_id); | |
13 | ||
14 | /* | |
15 | * Common unbind function for all event sources. Takes IRQ to unbind from. | |
16 | * Automatically closes the underlying event channel (even for bindings | |
17 | * made with bind_evtchn_to_irqhandler()). | |
18 | */ | |
19 | void unbind_from_irqhandler(unsigned int irq, void *dev_id); | |
20 | ||
21 | static inline void notify_remote_via_evtchn(int port) | |
22 | { | |
23 | struct evtchn_send send = { .port = port }; | |
24 | (void)HYPERVISOR_event_channel_op(EVTCHNOP_send, &send); | |
25 | } | |
26 | ||
27 | extern void notify_remote_via_irq(int irq); | |
28 | #endif /* _XEN_EVENTS_H */ |