diff options
Diffstat (limited to 'include/asm-cris/arch-v10/irq.h')
-rw-r--r-- | include/asm-cris/arch-v10/irq.h | 27 |
1 files changed, 3 insertions, 24 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 | ||
76 | extern struct etrax_interrupt_vector *etrax_irv; | 76 | extern struct etrax_interrupt_vector *etrax_irv; |
77 | void set_int_vector(int n, irqvectptr addr, irqvectptr saddr); | 77 | void set_int_vector(int n, irqvectptr addr); |
78 | void set_break_vector(int n, irqvectptr addr); | 78 | void 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) \ |
123 | void IRQ_NAME(nr); \ | 120 | void IRQ_NAME(nr); \ |
124 | void sIRQ_NAME(nr); \ | ||
125 | void 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) \ |
161 | void IRQ_NAME(nr); \ | 149 | void IRQ_NAME(nr); \ |
162 | void sIRQ_NAME(nr); \ | ||
163 | void 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 |