More Makefile cleanups, otherwise mainly noticeable are the netfilter fix
[davej-history.git] / include / linux / irq.h
blobde247650398a4c5c7d46f5ad54130858f5ababfa
1 #ifndef __irq_h
2 #define __irq_h
4 #include <linux/cache.h>
5 #include <linux/spinlock.h>
7 #include <asm/irq.h>
8 #include <asm/ptrace.h>
11 * IRQ line status.
13 #define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */
14 #define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */
15 #define IRQ_PENDING 4 /* IRQ pending - replay on enable */
16 #define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */
17 #define IRQ_AUTODETECT 16 /* IRQ is being autodetected */
18 #define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */
19 #define IRQ_LEVEL 64 /* IRQ level triggered */
20 #define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */
21 #define IRQ_PER_CPU 256 /* IRQ is per CPU */
24 * Interrupt controller descriptor. This is all we need
25 * to describe about the low-level hardware.
27 struct hw_interrupt_type {
28 const char * typename;
29 unsigned int (*startup)(unsigned int irq);
30 void (*shutdown)(unsigned int irq);
31 void (*enable)(unsigned int irq);
32 void (*disable)(unsigned int irq);
33 void (*ack)(unsigned int irq);
34 void (*end)(unsigned int irq);
35 void (*set_affinity)(unsigned int irq, unsigned long mask);
38 typedef struct hw_interrupt_type hw_irq_controller;
41 * This is the "IRQ descriptor", which contains various information
42 * about the irq, including what kind of hardware handling it has,
43 * whether it is disabled etc etc.
45 * Pad this out to 32 bytes for cache and indexing reasons.
47 typedef struct {
48 unsigned int status; /* IRQ status */
49 hw_irq_controller *handler;
50 struct irqaction *action; /* IRQ action list */
51 unsigned int depth; /* nested irq disables */
52 spinlock_t lock;
53 } ____cacheline_aligned irq_desc_t;
55 extern irq_desc_t irq_desc [NR_IRQS];
57 #include <asm/hw_irq.h> /* the arch dependent stuff */
59 extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
60 extern int setup_irq(unsigned int , struct irqaction * );
62 extern hw_irq_controller no_irq_type; /* needed in every arch ? */
63 extern void no_action(int cpl, void *dev_id, struct pt_regs *regs);
65 extern volatile unsigned long irq_err_count;
67 #endif /* __asm_h */