1#ifndef __irq_h
2#define __irq_h
3
4
5
6
7
8
9
10
11
12#include <linux/config.h>
13
14#if !defined(CONFIG_ARCH_S390)
15
16#include <linux/cache.h>
17#include <linux/spinlock.h>
18
19#include <asm/irq.h>
20#include <asm/ptrace.h>
21
22
23
24
25#define IRQ_INPROGRESS 1
26#define IRQ_DISABLED 2
27#define IRQ_PENDING 4
28#define IRQ_REPLAY 8
29#define IRQ_AUTODETECT 16
30#define IRQ_WAITING 32
31#define IRQ_LEVEL 64
32#define IRQ_MASKED 128
33#define IRQ_PER_CPU 256
34
35
36
37
38
39struct 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};
49
50typedef struct hw_interrupt_type hw_irq_controller;
51
52
53
54
55
56
57
58
59typedef struct {
60 unsigned int status;
61 hw_irq_controller *handler;
62 struct irqaction *action;
63 unsigned int depth;
64 spinlock_t lock;
65} ____cacheline_aligned irq_desc_t;
66
67extern irq_desc_t irq_desc [NR_IRQS];
68
69#include <asm/hw_irq.h>
70
71extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
72extern int setup_irq(unsigned int , struct irqaction * );
73
74extern hw_irq_controller no_irq_type;
75extern void no_action(int cpl, void *dev_id, struct pt_regs *regs);
76
77#endif
78
79#endif
80