xen_intr.h (3a6d1fcf9c8ed864c98e449a0b7696be6c838aea) | xen_intr.h (126780243806a6b6cf345b9b548f68010e921aec) |
---|---|
1/* -*- Mode:C; c-basic-offset:4; tab-width:4 -*- */ 2#ifndef _XEN_INTR_H_ 3#define _XEN_INTR_H_ 4 5/* 6* The flat IRQ space is divided into two regions: 7* 1. A one-to-one mapping of real physical IRQs. This space is only used 8* if we have physical device-access privilege. This region is at the --- 15 unchanged lines hidden (view full) --- 24#define NR_IRQS (NR_PIRQS + NR_DYNIRQS) 25 26#define pirq_to_irq(_x) ((_x) + PIRQ_BASE) 27#define irq_to_pirq(_x) ((_x) - PIRQ_BASE) 28 29#define dynirq_to_irq(_x) ((_x) + DYNIRQ_BASE) 30#define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE) 31 | 1/* -*- Mode:C; c-basic-offset:4; tab-width:4 -*- */ 2#ifndef _XEN_INTR_H_ 3#define _XEN_INTR_H_ 4 5/* 6* The flat IRQ space is divided into two regions: 7* 1. A one-to-one mapping of real physical IRQs. This space is only used 8* if we have physical device-access privilege. This region is at the --- 15 unchanged lines hidden (view full) --- 24#define NR_IRQS (NR_PIRQS + NR_DYNIRQS) 25 26#define pirq_to_irq(_x) ((_x) + PIRQ_BASE) 27#define irq_to_pirq(_x) ((_x) - PIRQ_BASE) 28 29#define dynirq_to_irq(_x) ((_x) + DYNIRQ_BASE) 30#define irq_to_dynirq(_x) ((_x) - DYNIRQ_BASE) 31 |
32/* Dynamic binding of event channels and VIRQ sources to Linux IRQ space. */ 33extern void unbind_from_irq(int irq); | 32/* 33 * Dynamic binding of event channels and VIRQ sources to guest IRQ space. 34 */ |
34 | 35 |
36/* 37 * Bind a caller port event channel to an interrupt handler. If 38 * successful, the guest IRQ number is returned in *irqp. Return zero 39 * on success or errno otherwise. 40 */ |
|
35extern int bind_caller_port_to_irqhandler(unsigned int caller_port, 36 const char *devname, driver_intr_t handler, void *arg, 37 unsigned long irqflags, unsigned int *irqp); | 41extern int bind_caller_port_to_irqhandler(unsigned int caller_port, 42 const char *devname, driver_intr_t handler, void *arg, 43 unsigned long irqflags, unsigned int *irqp); |
44 45/* 46 * Bind a listening port to an interrupt handler. If successful, the 47 * guest IRQ number is returned in *irqp. Return zero on success or 48 * errno otherwise. 49 */ |
|
38extern int bind_listening_port_to_irqhandler(unsigned int remote_domain, | 50extern int bind_listening_port_to_irqhandler(unsigned int remote_domain, |
39 const char *devname, driver_intr_t handler, void *arg, unsigned long irqflags, 40 unsigned int *irqp); | 51 const char *devname, driver_intr_t handler, void *arg, 52 unsigned long irqflags, unsigned int *irqp); 53 54/* 55 * Bind a VIRQ to an interrupt handler. If successful, the guest IRQ 56 * number is returned in *irqp. Return zero on success or errno 57 * otherwise. 58 */ |
41extern int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, 42 const char *devname, driver_filter_t filter, driver_intr_t handler, 43 void *arg, unsigned long irqflags, unsigned int *irqp); | 59extern int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu, 60 const char *devname, driver_filter_t filter, driver_intr_t handler, 61 void *arg, unsigned long irqflags, unsigned int *irqp); |
44extern int bind_ipi_to_irqhandler(unsigned int ipi, 45 unsigned int cpu, 46 const char *devname, 47 driver_filter_t handler, 48 unsigned long irqflags, 49 unsigned int *irqp); | |
50 | 62 |
63/* 64 * Bind an IPI to an interrupt handler. If successful, the guest 65 * IRQ number is returned in *irqp. Return zero on success or errno 66 * otherwise. 67 */ 68extern int bind_ipi_to_irqhandler(unsigned int ipi, unsigned int cpu, 69 const char *devname, driver_filter_t filter, 70 unsigned long irqflags, unsigned int *irqp); 71 72/* 73 * Bind an interdomain event channel to an interrupt handler. If 74 * successful, the guest IRQ number is returned in *irqp. Return zero 75 * on success or errno otherwise. 76 */ |
|
51extern int bind_interdomain_evtchn_to_irqhandler(unsigned int remote_domain, | 77extern int bind_interdomain_evtchn_to_irqhandler(unsigned int remote_domain, |
52 unsigned int remote_port, 53 const char *devname, 54 driver_filter_t filter, 55 driver_intr_t handler, 56 unsigned long irqflags, 57 unsigned int *irqp); | 78 unsigned int remote_port, const char *devname, 79 driver_filter_t filter, driver_intr_t handler, 80 unsigned long irqflags, unsigned int *irqp); |
58 | 81 |
82/* 83 * Unbind an interrupt handler using the guest IRQ number returned 84 * when it was bound. 85 */ 86extern void unbind_from_irqhandler(unsigned int irq); |
|
59 | 87 |
60 61extern void unbind_from_irqhandler(unsigned int evtchn); 62static __inline__ int irq_cannonicalize(int irq) | 88static __inline__ int irq_cannonicalize(unsigned int irq) |
63{ 64 return (irq == 2) ? 9 : irq; 65} 66 67extern void disable_irq(unsigned int); 68extern void disable_irq_nosync(unsigned int); 69extern void enable_irq(unsigned int); 70 71extern void irq_suspend(void); 72extern void irq_resume(void); 73 74extern void idle_block(void); 75extern int ap_cpu_initclocks(int cpu); 76 77#endif /* _XEN_INTR_H_ */ | 89{ 90 return (irq == 2) ? 9 : irq; 91} 92 93extern void disable_irq(unsigned int); 94extern void disable_irq_nosync(unsigned int); 95extern void enable_irq(unsigned int); 96 97extern void irq_suspend(void); 98extern void irq_resume(void); 99 100extern void idle_block(void); 101extern int ap_cpu_initclocks(int cpu); 102 103#endif /* _XEN_INTR_H_ */ |