direct-io.hg

view xen/include/xen/irq.h @ 9315:4d4a700bea7a

Move __do_IRQ() definition to ia64 header file where it belongs.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Mar 18 11:12:45 2006 +0100 (2006-03-18)
parents 8a551ec13d93
children 42a8e3101c6c
line source
1 #ifndef __XEN_IRQ_H__
2 #define __XEN_IRQ_H__
4 #include <xen/config.h>
5 #include <xen/cpumask.h>
6 #include <xen/spinlock.h>
7 #include <asm/regs.h>
8 #include <asm/hardirq.h>
10 struct irqaction
11 {
12 void (*handler)(int, void *, struct cpu_user_regs *);
13 const char *name;
14 void *dev_id;
15 };
17 /*
18 * IRQ line status.
19 */
20 #define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */
21 #define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */
22 #define IRQ_PENDING 4 /* IRQ pending - replay on enable */
23 #define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */
24 #define IRQ_GUEST 16 /* IRQ is handled by guest OS(es) */
25 #define IRQ_PER_CPU 256 /* IRQ is per CPU */
27 /*
28 * Interrupt controller descriptor. This is all we need
29 * to describe about the low-level hardware.
30 */
31 struct hw_interrupt_type {
32 const char *typename;
33 unsigned int (*startup)(unsigned int irq);
34 void (*shutdown)(unsigned int irq);
35 void (*enable)(unsigned int irq);
36 void (*disable)(unsigned int irq);
37 void (*ack)(unsigned int irq);
38 void (*end)(unsigned int irq);
39 void (*set_affinity)(unsigned int irq, cpumask_t mask);
40 };
42 typedef struct hw_interrupt_type hw_irq_controller;
44 #include <asm/irq.h>
46 /*
47 * This is the "IRQ descriptor", which contains various information
48 * about the irq, including what kind of hardware handling it has,
49 * whether it is disabled etc etc.
50 *
51 * Pad this out to 32 bytes for cache and indexing reasons.
52 */
53 typedef struct {
54 unsigned int status; /* IRQ status */
55 hw_irq_controller *handler;
56 struct irqaction *action; /* IRQ action list */
57 unsigned int depth; /* nested irq disables */
58 spinlock_t lock;
59 } __cacheline_aligned irq_desc_t;
61 extern irq_desc_t irq_desc[NR_IRQS];
63 extern int setup_irq(unsigned int, struct irqaction *);
64 extern void free_irq(unsigned int);
66 extern hw_irq_controller no_irq_type;
67 extern void no_action(int cpl, void *dev_id, struct cpu_user_regs *regs);
69 struct domain;
70 struct vcpu;
71 extern int pirq_guest_unmask(struct domain *p);
72 extern int pirq_guest_bind(struct vcpu *p, int irq, int will_share);
73 extern int pirq_guest_unbind(struct domain *p, int irq);
75 #endif /* __XEN_IRQ_H__ */