Changeset View
Changeset View
Standalone View
Standalone View
sys/xen/xen_intr.h
Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* \returns 0 on success, otherwise an errno. | * \returns 0 on success, otherwise an errno. | ||||
*/ | */ | ||||
int xen_intr_alloc_and_bind_ipi(u_int cpu, | int xen_intr_alloc_and_bind_ipi(u_int cpu, | ||||
driver_filter_t filter, enum intr_type irqflags, | driver_filter_t filter, enum intr_type irqflags, | ||||
xen_intr_handle_t *handlep); | xen_intr_handle_t *handlep); | ||||
/** | /** | ||||
* Register a physical interrupt vector and setup the interrupt source. | |||||
* | |||||
* \param vector The global vector to use. | |||||
* \param trig Default trigger method. | |||||
* \param pol Default polarity of the interrupt. | |||||
* | |||||
* \returns 0 on success, otherwise an errno. | |||||
*/ | |||||
int xen_register_pirq(int vector, enum intr_trigger trig, | |||||
enum intr_polarity pol); | |||||
/** | |||||
* Unbind an interrupt handler from its interrupt source. | * Unbind an interrupt handler from its interrupt source. | ||||
* | * | ||||
* \param handlep A pointer to the opaque handle that was initialized | * \param handlep A pointer to the opaque handle that was initialized | ||||
* at the time the interrupt source was bound. | * at the time the interrupt source was bound. | ||||
* | * | ||||
* \returns 0 on success, otherwise an errno. | * \returns 0 on success, otherwise an errno. | ||||
* | * | ||||
* \note The event channel, if any, that was allocated at bind time is | * \note The event channel, if any, that was allocated at bind time is | ||||
Show All 38 Lines | |||||
* \param handle The opaque handle that was initialized at the time | * \param handle The opaque handle that was initialized at the time | ||||
* the interrupt source was bound. | * the interrupt source was bound. | ||||
* | * | ||||
* \returns 0 if the handle is invalid, otherwise positive port number. | * \returns 0 if the handle is invalid, otherwise positive port number. | ||||
*/ | */ | ||||
evtchn_port_t xen_intr_port(xen_intr_handle_t handle); | evtchn_port_t xen_intr_port(xen_intr_handle_t handle); | ||||
/** | /** | ||||
* Setup MSI vector interrupt(s). | |||||
* | |||||
* \param dev The device that requests the binding. | |||||
* | |||||
* \param vector Requested initial vector to bind the MSI interrupt(s) to. | |||||
* | |||||
* \param count Number of vectors to allocate. | |||||
* | |||||
* \returns 0 on success, otherwise an errno. | |||||
*/ | |||||
int xen_register_msi(device_t dev, int vector, int count); | |||||
/** | |||||
* Teardown a MSI vector interrupt. | |||||
* | |||||
* \param vector Requested vector to release. | |||||
* | |||||
* \returns 0 on success, otherwise an errno. | |||||
*/ | |||||
int xen_release_msi(int vector); | |||||
/** | |||||
* Bind an event channel port with a handler | * Bind an event channel port with a handler | ||||
* | * | ||||
* \param dev The device making this bind request. | * \param dev The device making this bind request. | ||||
* \param filter An interrupt filter handler. Specify NULL | * \param filter An interrupt filter handler. Specify NULL | ||||
* to always dispatch to the ithread handler. | * to always dispatch to the ithread handler. | ||||
* \param handler An interrupt ithread handler. Optional (can | * \param handler An interrupt ithread handler. Optional (can | ||||
* specify NULL) if all necessary event actions | * specify NULL) if all necessary event actions | ||||
* are performed by filter. | * are performed by filter. | ||||
Show All 13 Lines | |||||
* \param port Event channel port to which we get a reference. | * \param port Event channel port to which we get a reference. | ||||
* \param handlep Pointer to an opaque handle used to manage this | * \param handlep Pointer to an opaque handle used to manage this | ||||
* registration. | * registration. | ||||
* | * | ||||
* \returns 0 on success, otherwise an errno. | * \returns 0 on success, otherwise an errno. | ||||
*/ | */ | ||||
int xen_intr_get_evtchn_from_port(evtchn_port_t port, | int xen_intr_get_evtchn_from_port(evtchn_port_t port, | ||||
xen_intr_handle_t *handlep); | xen_intr_handle_t *handlep); | ||||
/** | |||||
* Register the IO-APIC PIRQs when running in legacy PVH Dom0 mode. | |||||
* | |||||
* \param pic PIC instance. | |||||
* | |||||
* NB: this should be removed together with the support for legacy PVH mode. | |||||
*/ | |||||
struct pic; | |||||
void xenpv_register_pirqs(struct pic *pic); | |||||
#endif /* _XEN_INTR_H_ */ | #endif /* _XEN_INTR_H_ */ |