ia64/xen-unstable

view linux-2.4-xen-sparse/include/linux/irq.h @ 6385:f34e732ed4bf

Xenstore testsuite robustness: save output rather than rerun on failure.
"make check" reruns a test which fails with more verbosity. If the test
fails intermittently, that doesn't work well: save the output and simply
dump it if the test fails.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Aug 23 19:58:59 2005 +0000 (2005-08-23)
parents f294acb25858
children 8799d14bef77 9312a3e8a6f8 23979fb12c49 84ee014ebd41 99914b54f7bf 81576d3d1ca8 3a8f27c6d56c cc5f88b719d0 fa0754a9f64f 112d44270733
line source
1 #ifndef __irq_h
2 #define __irq_h
4 /*
5 * Please do not include this file in generic code. There is currently
6 * no requirement for any architecture to implement anything held
7 * within this file.
8 *
9 * Thanks. --rmk
10 */
12 #include <linux/config.h>
14 #if !defined(CONFIG_ARCH_S390)
16 #include <linux/cache.h>
17 #include <linux/spinlock.h>
19 #include <asm/irq.h>
20 #include <asm/ptrace.h>
22 /*
23 * IRQ line status.
24 */
25 #define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */
26 #define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */
27 #define IRQ_PENDING 4 /* IRQ pending - replay on enable */
28 #define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */
29 #define IRQ_AUTODETECT 16 /* IRQ is being autodetected */
30 #define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */
31 #define IRQ_LEVEL 64 /* IRQ level triggered */
32 #define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */
33 #define IRQ_PER_CPU 256 /* IRQ is per CPU */
35 /*
36 * Interrupt controller descriptor. This is all we need
37 * to describe about the low-level hardware.
38 */
39 struct hw_interrupt_type {
40 const char * typename;
41 unsigned int (*startup)(unsigned int irq);
42 void (*shutdown)(unsigned int irq);
43 void (*enable)(unsigned int irq);
44 void (*disable)(unsigned int irq);
45 void (*ack)(unsigned int irq);
46 void (*end)(unsigned int irq);
47 void (*set_affinity)(unsigned int irq, unsigned long mask);
48 };
50 typedef struct hw_interrupt_type hw_irq_controller;
52 /*
53 * This is the "IRQ descriptor", which contains various information
54 * about the irq, including what kind of hardware handling it has,
55 * whether it is disabled etc etc.
56 *
57 * Pad this out to 32 bytes for cache and indexing reasons.
58 */
59 typedef struct {
60 unsigned int status; /* IRQ status */
61 hw_irq_controller *handler;
62 struct irqaction *action; /* IRQ action list */
63 unsigned int depth; /* nested irq disables */
64 spinlock_t lock;
65 } ____cacheline_aligned irq_desc_t;
67 extern irq_desc_t irq_desc [NR_IRQS];
69 #include <asm/hw_irq.h> /* the arch dependent stuff */
71 extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
72 extern int setup_irq(unsigned int , struct irqaction * );
73 extern int teardown_irq(unsigned int , struct irqaction * );
75 extern hw_irq_controller no_irq_type; /* needed in every arch ? */
76 extern void no_action(int cpl, void *dev_id, struct pt_regs *regs);
78 #endif
80 #endif /* __irq_h */