aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/irq.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
new file mode 100644
index 000000000000..c3ff4d101667
--- /dev/null
+++ b/include/linux/irq.h
@@ -0,0 +1,97 @@
1#ifndef __irq_h
2#define __irq_h
3
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 */
11
12#include <linux/config.h>
13
14#if !defined(CONFIG_ARCH_S390)
15
16#include <linux/linkage.h>
17#include <linux/cache.h>
18#include <linux/spinlock.h>
19#include <linux/cpumask.h>
20
21#include <asm/irq.h>
22#include <asm/ptrace.h>
23
24/*
25 * IRQ line status.
26 */
27#define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */
28#define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */
29#define IRQ_PENDING 4 /* IRQ pending - replay on enable */
30#define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */
31#define IRQ_AUTODETECT 16 /* IRQ is being autodetected */
32#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */
33#define IRQ_LEVEL 64 /* IRQ level triggered */
34#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */
35#define IRQ_PER_CPU 256 /* IRQ is per CPU */
36
37/*
38 * Interrupt controller descriptor. This is all we need
39 * to describe about the low-level hardware.
40 */
41struct hw_interrupt_type {
42 const char * typename;
43 unsigned int (*startup)(unsigned int irq);
44 void (*shutdown)(unsigned int irq);
45 void (*enable)(unsigned int irq);
46 void (*disable)(unsigned int irq);
47 void (*ack)(unsigned int irq);
48 void (*end)(unsigned int irq);
49 void (*set_affinity)(unsigned int irq, cpumask_t dest);
50};
51
52typedef struct hw_interrupt_type hw_irq_controller;
53
54/*
55 * This is the "IRQ descriptor", which contains various information
56 * about the irq, including what kind of hardware handling it has,
57 * whether it is disabled etc etc.
58 *
59 * Pad this out to 32 bytes for cache and indexing reasons.
60 */
61typedef struct irq_desc {
62 hw_irq_controller *handler;
63 void *handler_data;
64 struct irqaction *action; /* IRQ action list */
65 unsigned int status; /* IRQ status */
66 unsigned int depth; /* nested irq disables */
67 unsigned int irq_count; /* For detecting broken interrupts */
68 unsigned int irqs_unhandled;
69 spinlock_t lock;
70} ____cacheline_aligned irq_desc_t;
71
72extern irq_desc_t irq_desc [NR_IRQS];
73
74#include <asm/hw_irq.h> /* the arch dependent stuff */
75
76extern int setup_irq(unsigned int irq, struct irqaction * new);
77
78#ifdef CONFIG_GENERIC_HARDIRQS
79extern cpumask_t irq_affinity[NR_IRQS];
80extern int no_irq_affinity;
81extern int noirqdebug_setup(char *str);
82
83extern fastcall int handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
84 struct irqaction *action);
85extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
86extern void note_interrupt(unsigned int irq, irq_desc_t *desc, int action_ret);
87extern void report_bad_irq(unsigned int irq, irq_desc_t *desc, int action_ret);
88extern int can_request_irq(unsigned int irq, unsigned long irqflags);
89
90extern void init_irq_proc(void);
91#endif
92
93extern hw_irq_controller no_irq_type; /* needed in every arch ? */
94
95#endif
96
97#endif /* __irq_h */