diff options
Diffstat (limited to 'include/xen/events.h')
| -rw-r--r-- | include/xen/events.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/xen/events.h b/include/xen/events.h index a15d93262e30..646dd17d3aa4 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
| @@ -12,6 +12,7 @@ int bind_evtchn_to_irqhandler(unsigned int evtchn, | |||
| 12 | irq_handler_t handler, | 12 | irq_handler_t handler, |
| 13 | unsigned long irqflags, const char *devname, | 13 | unsigned long irqflags, const char *devname, |
| 14 | void *dev_id); | 14 | void *dev_id); |
| 15 | int bind_virq_to_irq(unsigned int virq, unsigned int cpu); | ||
| 15 | int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, | 16 | int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, |
| 16 | irq_handler_t handler, | 17 | irq_handler_t handler, |
| 17 | unsigned long irqflags, const char *devname, | 18 | unsigned long irqflags, const char *devname, |
| @@ -53,6 +54,10 @@ bool xen_test_irq_pending(int irq); | |||
| 53 | irq will be disabled so it won't deliver an interrupt. */ | 54 | irq will be disabled so it won't deliver an interrupt. */ |
| 54 | void xen_poll_irq(int irq); | 55 | void xen_poll_irq(int irq); |
| 55 | 56 | ||
| 57 | /* Poll waiting for an irq to become pending with a timeout. In the usual case, | ||
| 58 | * the irq will be disabled so it won't deliver an interrupt. */ | ||
| 59 | void xen_poll_irq_timeout(int irq, u64 timeout); | ||
| 60 | |||
| 56 | /* Determine the IRQ which is bound to an event channel */ | 61 | /* Determine the IRQ which is bound to an event channel */ |
| 57 | unsigned irq_from_evtchn(unsigned int evtchn); | 62 | unsigned irq_from_evtchn(unsigned int evtchn); |
| 58 | 63 | ||
| @@ -63,4 +68,25 @@ int xen_set_callback_via(uint64_t via); | |||
| 63 | void xen_evtchn_do_upcall(struct pt_regs *regs); | 68 | void xen_evtchn_do_upcall(struct pt_regs *regs); |
| 64 | void xen_hvm_evtchn_do_upcall(void); | 69 | void xen_hvm_evtchn_do_upcall(void); |
| 65 | 70 | ||
| 71 | /* Allocate an irq for a physical interrupt, given a gsi. "Legacy" | ||
| 72 | * GSIs are identity mapped; others are dynamically allocated as | ||
| 73 | * usual. */ | ||
| 74 | int xen_allocate_pirq(unsigned gsi, int shareable, char *name); | ||
| 75 | int xen_map_pirq_gsi(unsigned pirq, unsigned gsi, int shareable, char *name); | ||
| 76 | |||
| 77 | #ifdef CONFIG_PCI_MSI | ||
| 78 | /* Allocate an irq and a pirq to be used with MSIs. */ | ||
| 79 | void xen_allocate_pirq_msi(char *name, int *irq, int *pirq); | ||
| 80 | int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc, int type); | ||
| 81 | #endif | ||
| 82 | |||
| 83 | /* De-allocates the above mentioned physical interrupt. */ | ||
| 84 | int xen_destroy_irq(int irq); | ||
| 85 | |||
| 86 | /* Return vector allocated to pirq */ | ||
| 87 | int xen_vector_from_irq(unsigned pirq); | ||
| 88 | |||
| 89 | /* Return gsi allocated to pirq */ | ||
| 90 | int xen_gsi_from_irq(unsigned pirq); | ||
| 91 | |||
| 66 | #endif /* _XEN_EVENTS_H */ | 92 | #endif /* _XEN_EVENTS_H */ |
