aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris
diff options
context:
space:
mode:
authorMikael Starvik <mikael.starvik@axis.com>2005-07-27 14:44:36 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-27 19:26:00 -0400
commit2e0cea1decf7f21df0496571c218df3b3b8cce99 (patch)
tree7d6a2a99013b2a4270f4d0a9ccf2d71549488f48 /include/asm-cris
parent63245d2cde2be64f172388c2c50862f233c05700 (diff)
[PATCH] CRIS update: IRQ
Use the generic IRQ framework Signed-off-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-cris')
-rw-r--r--include/asm-cris/arch-v10/irq.h27
-rw-r--r--include/asm-cris/hardirq.h5
-rw-r--r--include/asm-cris/hw_irq.h7
-rw-r--r--include/asm-cris/irq.h10
4 files changed, 12 insertions, 37 deletions
diff --git a/include/asm-cris/arch-v10/irq.h b/include/asm-cris/arch-v10/irq.h
index a2a6e1533ea0..4fa8945b0263 100644
--- a/include/asm-cris/arch-v10/irq.h
+++ b/include/asm-cris/arch-v10/irq.h
@@ -74,12 +74,9 @@ struct etrax_interrupt_vector {
74}; 74};
75 75
76extern struct etrax_interrupt_vector *etrax_irv; 76extern struct etrax_interrupt_vector *etrax_irv;
77void set_int_vector(int n, irqvectptr addr, irqvectptr saddr); 77void set_int_vector(int n, irqvectptr addr);
78void set_break_vector(int n, irqvectptr addr); 78void set_break_vector(int n, irqvectptr addr);
79 79
80#define mask_irq(irq_nr) (*R_VECT_MASK_CLR = 1 << (irq_nr));
81#define unmask_irq(irq_nr) (*R_VECT_MASK_SET = 1 << (irq_nr));
82
83#define __STR(x) #x 80#define __STR(x) #x
84#define STR(x) __STR(x) 81#define STR(x) __STR(x)
85 82
@@ -121,26 +118,17 @@ void set_break_vector(int n, irqvectptr addr);
121 118
122#define BUILD_IRQ(nr,mask) \ 119#define BUILD_IRQ(nr,mask) \
123void IRQ_NAME(nr); \ 120void IRQ_NAME(nr); \
124void sIRQ_NAME(nr); \
125void BAD_IRQ_NAME(nr); \
126__asm__ ( \ 121__asm__ ( \
127 ".text\n\t" \ 122 ".text\n\t" \
128 "IRQ" #nr "_interrupt:\n\t" \ 123 "IRQ" #nr "_interrupt:\n\t" \
129 SAVE_ALL \ 124 SAVE_ALL \
130 "sIRQ" #nr "_interrupt:\n\t" /* shortcut for the multiple irq handler */ \
131 BLOCK_IRQ(mask,nr) /* this must be done to prevent irq loops when we ei later */ \ 125 BLOCK_IRQ(mask,nr) /* this must be done to prevent irq loops when we ei later */ \
132 "moveq "#nr",$r10\n\t" \ 126 "moveq "#nr",$r10\n\t" \
133 "move.d $sp,$r11\n\t" \ 127 "move.d $sp,$r11\n\t" \
134 "jsr do_IRQ\n\t" /* irq.c, r10 and r11 are arguments */ \ 128 "jsr do_IRQ\n\t" /* irq.c, r10 and r11 are arguments */ \
135 UNBLOCK_IRQ(mask) \ 129 UNBLOCK_IRQ(mask) \
136 "moveq 0,$r9\n\t" /* make ret_from_intr realise we came from an irq */ \ 130 "moveq 0,$r9\n\t" /* make ret_from_intr realise we came from an irq */ \
137 "jump ret_from_intr\n\t" \ 131 "jump ret_from_intr\n\t");
138 "bad_IRQ" #nr "_interrupt:\n\t" \
139 "push $r0\n\t" \
140 BLOCK_IRQ(mask,nr) \
141 "pop $r0\n\t" \
142 "reti\n\t" \
143 "nop\n");
144 132
145/* This is subtle. The timer interrupt is crucial and it should not be disabled for 133/* This is subtle. The timer interrupt is crucial and it should not be disabled for
146 * too long. However, if it had been a normal interrupt as per BUILD_IRQ, it would 134 * too long. However, if it had been a normal interrupt as per BUILD_IRQ, it would
@@ -159,23 +147,14 @@ __asm__ ( \
159 147
160#define BUILD_TIMER_IRQ(nr,mask) \ 148#define BUILD_TIMER_IRQ(nr,mask) \
161void IRQ_NAME(nr); \ 149void IRQ_NAME(nr); \
162void sIRQ_NAME(nr); \
163void BAD_IRQ_NAME(nr); \
164__asm__ ( \ 150__asm__ ( \
165 ".text\n\t" \ 151 ".text\n\t" \
166 "IRQ" #nr "_interrupt:\n\t" \ 152 "IRQ" #nr "_interrupt:\n\t" \
167 SAVE_ALL \ 153 SAVE_ALL \
168 "sIRQ" #nr "_interrupt:\n\t" /* shortcut for the multiple irq handler */ \
169 "moveq "#nr",$r10\n\t" \ 154 "moveq "#nr",$r10\n\t" \
170 "move.d $sp,$r11\n\t" \ 155 "move.d $sp,$r11\n\t" \
171 "jsr do_IRQ\n\t" /* irq.c, r10 and r11 are arguments */ \ 156 "jsr do_IRQ\n\t" /* irq.c, r10 and r11 are arguments */ \
172 "moveq 0,$r9\n\t" /* make ret_from_intr realise we came from an irq */ \ 157 "moveq 0,$r9\n\t" /* make ret_from_intr realise we came from an irq */ \
173 "jump ret_from_intr\n\t" \ 158 "jump ret_from_intr\n\t");
174 "bad_IRQ" #nr "_interrupt:\n\t" \
175 "push $r0\n\t" \
176 BLOCK_IRQ(mask,nr) \
177 "pop $r0\n\t" \
178 "reti\n\t" \
179 "nop\n");
180 159
181#endif 160#endif
diff --git a/include/asm-cris/hardirq.h b/include/asm-cris/hardirq.h
index f4d136228ee1..1c13dd3faac3 100644
--- a/include/asm-cris/hardirq.h
+++ b/include/asm-cris/hardirq.h
@@ -1,18 +1,17 @@
1#ifndef __ASM_HARDIRQ_H 1#ifndef __ASM_HARDIRQ_H
2#define __ASM_HARDIRQ_H 2#define __ASM_HARDIRQ_H
3 3
4/* only non-SMP supported */
5
6#include <linux/threads.h> 4#include <linux/threads.h>
7#include <linux/cache.h> 5#include <linux/cache.h>
8 6
9/* entry.S is sensitive to the offsets of these fields */
10typedef struct { 7typedef struct {
11 unsigned int __softirq_pending; 8 unsigned int __softirq_pending;
12} ____cacheline_aligned irq_cpustat_t; 9} ____cacheline_aligned irq_cpustat_t;
13 10
14#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ 11#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
15 12
13void ack_bad_irq(unsigned int irq);
14
16#define HARDIRQ_BITS 8 15#define HARDIRQ_BITS 8
17 16
18/* 17/*
diff --git a/include/asm-cris/hw_irq.h b/include/asm-cris/hw_irq.h
new file mode 100644
index 000000000000..341536a234e9
--- /dev/null
+++ b/include/asm-cris/hw_irq.h
@@ -0,0 +1,7 @@
1#ifndef _ASM_HW_IRQ_H
2#define _ASM_HW_IRQ_H
3
4static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
5
6#endif
7
diff --git a/include/asm-cris/irq.h b/include/asm-cris/irq.h
index 87f342517bb1..8e787fdaedd4 100644
--- a/include/asm-cris/irq.h
+++ b/include/asm-cris/irq.h
@@ -8,16 +8,6 @@ extern __inline__ int irq_canonicalize(int irq)
8 return irq; 8 return irq;
9} 9}
10 10
11extern void disable_irq(unsigned int);
12extern void enable_irq(unsigned int);
13
14#define disable_irq_nosync disable_irq
15#define enable_irq_nosync enable_irq
16
17struct irqaction;
18struct pt_regs;
19int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
20
21#endif /* _ASM_IRQ_H */ 11#endif /* _ASM_IRQ_H */
22 12
23 13