aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-19 13:40:00 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-19 13:40:00 -0500
commit4007162647b3b2e2e438904471b620aba013c4af (patch)
tree2798671e1fd62b632ccae6e03eda9c49ab95763a /arch/m68k
parent801a76050bcf8d4e500eb8d048ff6265f37a61c8 (diff)
parent00d1a39e69d5afa7523dad515a05b21abd17c389 (diff)
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq cleanups from Ingo Molnar: "This is a multi-arch cleanup series from Thomas Gleixner, which we kept to near the end of the merge window, to not interfere with architecture updates. This series (motivated by the -rt kernel) unifies more aspects of IRQ handling and generalizes PREEMPT_ACTIVE" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: preempt: Make PREEMPT_ACTIVE generic sparc: Use preempt_schedule_irq ia64: Use preempt_schedule_irq m32r: Use preempt_schedule_irq hardirq: Make hardirq bits generic m68k: Simplify low level interrupt handling code genirq: Prevent spurious detection for unconditionally polled interrupts
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/hardirq.h11
-rw-r--r--arch/m68k/include/asm/thread_info.h2
-rw-r--r--arch/m68k/kernel/entry.S40
-rw-r--r--arch/m68k/kernel/ints.c6
-rw-r--r--arch/m68k/platform/68000/entry.S33
-rw-r--r--arch/m68k/platform/68360/entry.S24
6 files changed, 15 insertions, 101 deletions
diff --git a/arch/m68k/include/asm/hardirq.h b/arch/m68k/include/asm/hardirq.h
index db30ed276878..6c618529d9b9 100644
--- a/arch/m68k/include/asm/hardirq.h
+++ b/arch/m68k/include/asm/hardirq.h
@@ -5,17 +5,6 @@
5#include <linux/cache.h> 5#include <linux/cache.h>
6#include <asm/irq.h> 6#include <asm/irq.h>
7 7
8#define HARDIRQ_BITS 8
9
10/*
11 * The hardirq mask has to be large enough to have
12 * space for potentially all IRQ sources in the system
13 * nesting on a single CPU:
14 */
15#if (1 << HARDIRQ_BITS) < NR_IRQS
16# error HARDIRQ_BITS is too low!
17#endif
18
19#ifdef CONFIG_MMU 8#ifdef CONFIG_MMU
20 9
21static inline void ack_bad_irq(unsigned int irq) 10static inline void ack_bad_irq(unsigned int irq)
diff --git a/arch/m68k/include/asm/thread_info.h b/arch/m68k/include/asm/thread_info.h
index 126131f94a2c..21a4784ca5a1 100644
--- a/arch/m68k/include/asm/thread_info.h
+++ b/arch/m68k/include/asm/thread_info.h
@@ -35,8 +35,6 @@ struct thread_info {
35}; 35};
36#endif /* __ASSEMBLY__ */ 36#endif /* __ASSEMBLY__ */
37 37
38#define PREEMPT_ACTIVE 0x4000000
39
40#define INIT_THREAD_INFO(tsk) \ 38#define INIT_THREAD_INFO(tsk) \
41{ \ 39{ \
42 .task = &tsk, \ 40 .task = &tsk, \
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index a78f5649e8de..b54ac7aba850 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -45,7 +45,7 @@
45.globl system_call, buserr, trap, resume 45.globl system_call, buserr, trap, resume
46.globl sys_call_table 46.globl sys_call_table
47.globl __sys_fork, __sys_clone, __sys_vfork 47.globl __sys_fork, __sys_clone, __sys_vfork
48.globl ret_from_interrupt, bad_interrupt 48.globl bad_interrupt
49.globl auto_irqhandler_fixup 49.globl auto_irqhandler_fixup
50.globl user_irqvec_fixup 50.globl user_irqvec_fixup
51 51
@@ -275,8 +275,6 @@ do_delayed_trace:
275ENTRY(auto_inthandler) 275ENTRY(auto_inthandler)
276 SAVE_ALL_INT 276 SAVE_ALL_INT
277 GET_CURRENT(%d0) 277 GET_CURRENT(%d0)
278 movel %d0,%a1
279 addqb #1,%a1@(TINFO_PREEMPT+1)
280 | put exception # in d0 278 | put exception # in d0
281 bfextu %sp@(PT_OFF_FORMATVEC){#4,#10},%d0 279 bfextu %sp@(PT_OFF_FORMATVEC){#4,#10},%d0
282 subw #VEC_SPUR,%d0 280 subw #VEC_SPUR,%d0
@@ -286,32 +284,13 @@ ENTRY(auto_inthandler)
286auto_irqhandler_fixup = . + 2 284auto_irqhandler_fixup = . + 2
287 jsr do_IRQ | process the IRQ 285 jsr do_IRQ | process the IRQ
288 addql #8,%sp | pop parameters off stack 286 addql #8,%sp | pop parameters off stack
289 287 jra ret_from_exception
290ret_from_interrupt:
291 movel %curptr@(TASK_STACK),%a1
292 subqb #1,%a1@(TINFO_PREEMPT+1)
293 jeq ret_from_last_interrupt
2942: RESTORE_ALL
295
296 ALIGN
297ret_from_last_interrupt:
298 moveq #(~ALLOWINT>>8)&0xff,%d0
299 andb %sp@(PT_OFF_SR),%d0
300 jne 2b
301
302 /* check if we need to do software interrupts */
303 tstl irq_stat+CPUSTAT_SOFTIRQ_PENDING
304 jeq .Lret_from_exception
305 pea ret_from_exception
306 jra do_softirq
307 288
308/* Handler for user defined interrupt vectors */ 289/* Handler for user defined interrupt vectors */
309 290
310ENTRY(user_inthandler) 291ENTRY(user_inthandler)
311 SAVE_ALL_INT 292 SAVE_ALL_INT
312 GET_CURRENT(%d0) 293 GET_CURRENT(%d0)
313 movel %d0,%a1
314 addqb #1,%a1@(TINFO_PREEMPT+1)
315 | put exception # in d0 294 | put exception # in d0
316 bfextu %sp@(PT_OFF_FORMATVEC){#4,#10},%d0 295 bfextu %sp@(PT_OFF_FORMATVEC){#4,#10},%d0
317user_irqvec_fixup = . + 2 296user_irqvec_fixup = . + 2
@@ -321,29 +300,18 @@ user_irqvec_fixup = . + 2
321 movel %d0,%sp@- | put vector # on stack 300 movel %d0,%sp@- | put vector # on stack
322 jsr do_IRQ | process the IRQ 301 jsr do_IRQ | process the IRQ
323 addql #8,%sp | pop parameters off stack 302 addql #8,%sp | pop parameters off stack
324 303 jra ret_from_exception
325 movel %curptr@(TASK_STACK),%a1
326 subqb #1,%a1@(TINFO_PREEMPT+1)
327 jeq ret_from_last_interrupt
328 RESTORE_ALL
329 304
330/* Handler for uninitialized and spurious interrupts */ 305/* Handler for uninitialized and spurious interrupts */
331 306
332ENTRY(bad_inthandler) 307ENTRY(bad_inthandler)
333 SAVE_ALL_INT 308 SAVE_ALL_INT
334 GET_CURRENT(%d0) 309 GET_CURRENT(%d0)
335 movel %d0,%a1
336 addqb #1,%a1@(TINFO_PREEMPT+1)
337 310
338 movel %sp,%sp@- 311 movel %sp,%sp@-
339 jsr handle_badint 312 jsr handle_badint
340 addql #4,%sp 313 addql #4,%sp
341 314 jra ret_from_exception
342 movel %curptr@(TASK_STACK),%a1
343 subqb #1,%a1@(TINFO_PREEMPT+1)
344 jeq ret_from_last_interrupt
345 RESTORE_ALL
346
347 315
348resume: 316resume:
349 /* 317 /*
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 4d7da384eea0..077d3a70fed1 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -58,12 +58,6 @@ void __init init_IRQ(void)
58{ 58{
59 int i; 59 int i;
60 60
61 /* assembly irq entry code relies on this... */
62 if (HARDIRQ_MASK != 0x00ff0000) {
63 extern void hardirq_mask_is_broken(void);
64 hardirq_mask_is_broken();
65 }
66
67 for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++) 61 for (i = IRQ_AUTO_1; i <= IRQ_AUTO_7; i++)
68 irq_set_chip_and_handler(i, &auto_irq_chip, handle_simple_irq); 62 irq_set_chip_and_handler(i, &auto_irq_chip, handle_simple_irq);
69 63
diff --git a/arch/m68k/platform/68000/entry.S b/arch/m68k/platform/68000/entry.S
index 7f91c2fde509..23ac054c6e1a 100644
--- a/arch/m68k/platform/68000/entry.S
+++ b/arch/m68k/platform/68000/entry.S
@@ -27,7 +27,6 @@
27.globl ret_from_exception 27.globl ret_from_exception
28.globl ret_from_signal 28.globl ret_from_signal
29.globl sys_call_table 29.globl sys_call_table
30.globl ret_from_interrupt
31.globl bad_interrupt 30.globl bad_interrupt
32.globl inthandler1 31.globl inthandler1
33.globl inthandler2 32.globl inthandler2
@@ -137,7 +136,7 @@ inthandler1:
137 movel #65,%sp@- /* put vector # on stack*/ 136 movel #65,%sp@- /* put vector # on stack*/
138 jbsr process_int /* process the IRQ*/ 137 jbsr process_int /* process the IRQ*/
1393: addql #8,%sp /* pop parameters off stack*/ 1383: addql #8,%sp /* pop parameters off stack*/
140 bra ret_from_interrupt 139 bra ret_from_exception
141 140
142inthandler2: 141inthandler2:
143 SAVE_ALL_INT 142 SAVE_ALL_INT
@@ -148,7 +147,7 @@ inthandler2:
148 movel #66,%sp@- /* put vector # on stack*/ 147 movel #66,%sp@- /* put vector # on stack*/
149 jbsr process_int /* process the IRQ*/ 148 jbsr process_int /* process the IRQ*/
1503: addql #8,%sp /* pop parameters off stack*/ 1493: addql #8,%sp /* pop parameters off stack*/
151 bra ret_from_interrupt 150 bra ret_from_exception
152 151
153inthandler3: 152inthandler3:
154 SAVE_ALL_INT 153 SAVE_ALL_INT
@@ -159,7 +158,7 @@ inthandler3:
159 movel #67,%sp@- /* put vector # on stack*/ 158 movel #67,%sp@- /* put vector # on stack*/
160 jbsr process_int /* process the IRQ*/ 159 jbsr process_int /* process the IRQ*/
1613: addql #8,%sp /* pop parameters off stack*/ 1603: addql #8,%sp /* pop parameters off stack*/
162 bra ret_from_interrupt 161 bra ret_from_exception
163 162
164inthandler4: 163inthandler4:
165 SAVE_ALL_INT 164 SAVE_ALL_INT
@@ -170,7 +169,7 @@ inthandler4:
170 movel #68,%sp@- /* put vector # on stack*/ 169 movel #68,%sp@- /* put vector # on stack*/
171 jbsr process_int /* process the IRQ*/ 170 jbsr process_int /* process the IRQ*/
1723: addql #8,%sp /* pop parameters off stack*/ 1713: addql #8,%sp /* pop parameters off stack*/
173 bra ret_from_interrupt 172 bra ret_from_exception
174 173
175inthandler5: 174inthandler5:
176 SAVE_ALL_INT 175 SAVE_ALL_INT
@@ -181,7 +180,7 @@ inthandler5:
181 movel #69,%sp@- /* put vector # on stack*/ 180 movel #69,%sp@- /* put vector # on stack*/
182 jbsr process_int /* process the IRQ*/ 181 jbsr process_int /* process the IRQ*/
1833: addql #8,%sp /* pop parameters off stack*/ 1823: addql #8,%sp /* pop parameters off stack*/
184 bra ret_from_interrupt 183 bra ret_from_exception
185 184
186inthandler6: 185inthandler6:
187 SAVE_ALL_INT 186 SAVE_ALL_INT
@@ -192,7 +191,7 @@ inthandler6:
192 movel #70,%sp@- /* put vector # on stack*/ 191 movel #70,%sp@- /* put vector # on stack*/
193 jbsr process_int /* process the IRQ*/ 192 jbsr process_int /* process the IRQ*/
1943: addql #8,%sp /* pop parameters off stack*/ 1933: addql #8,%sp /* pop parameters off stack*/
195 bra ret_from_interrupt 194 bra ret_from_exception
196 195
197inthandler7: 196inthandler7:
198 SAVE_ALL_INT 197 SAVE_ALL_INT
@@ -203,7 +202,7 @@ inthandler7:
203 movel #71,%sp@- /* put vector # on stack*/ 202 movel #71,%sp@- /* put vector # on stack*/
204 jbsr process_int /* process the IRQ*/ 203 jbsr process_int /* process the IRQ*/
2053: addql #8,%sp /* pop parameters off stack*/ 2043: addql #8,%sp /* pop parameters off stack*/
206 bra ret_from_interrupt 205 bra ret_from_exception
207 206
208inthandler: 207inthandler:
209 SAVE_ALL_INT 208 SAVE_ALL_INT
@@ -214,23 +213,7 @@ inthandler:
214 movel %d0,%sp@- /* put vector # on stack*/ 213 movel %d0,%sp@- /* put vector # on stack*/
215 jbsr process_int /* process the IRQ*/ 214 jbsr process_int /* process the IRQ*/
2163: addql #8,%sp /* pop parameters off stack*/ 2153: addql #8,%sp /* pop parameters off stack*/
217 bra ret_from_interrupt 216 bra ret_from_exception
218
219ret_from_interrupt:
220 jeq 1f
2212:
222 RESTORE_ALL
2231:
224 moveb %sp@(PT_OFF_SR), %d0
225 and #7, %d0
226 jhi 2b
227
228 /* check if we need to do software interrupts */
229 jeq ret_from_exception
230
231 pea ret_from_exception
232 jra do_softirq
233
234 217
235/* 218/*
236 * Handler for uninitialized and spurious interrupts. 219 * Handler for uninitialized and spurious interrupts.
diff --git a/arch/m68k/platform/68360/entry.S b/arch/m68k/platform/68360/entry.S
index 904fd9a4af4e..447c33ef37fd 100644
--- a/arch/m68k/platform/68360/entry.S
+++ b/arch/m68k/platform/68360/entry.S
@@ -29,7 +29,6 @@
29.globl ret_from_exception 29.globl ret_from_exception
30.globl ret_from_signal 30.globl ret_from_signal
31.globl sys_call_table 31.globl sys_call_table
32.globl ret_from_interrupt
33.globl bad_interrupt 32.globl bad_interrupt
34.globl inthandler 33.globl inthandler
35 34
@@ -132,26 +131,9 @@ inthandler:
132 131
133 movel %sp,%sp@- 132 movel %sp,%sp@-
134 movel %d0,%sp@- /* put vector # on stack*/ 133 movel %d0,%sp@- /* put vector # on stack*/
135 jbsr do_IRQ /* process the IRQ*/ 134 jbsr do_IRQ /* process the IRQ */
1363: addql #8,%sp /* pop parameters off stack*/ 135 addql #8,%sp /* pop parameters off stack*/
137 bra ret_from_interrupt 136 jra ret_from_exception
138
139ret_from_interrupt:
140 jeq 1f
1412:
142 RESTORE_ALL
1431:
144 moveb %sp@(PT_OFF_SR), %d0
145 and #7, %d0
146 jhi 2b
147 /* check if we need to do software interrupts */
148
149 movel irq_stat+CPUSTAT_SOFTIRQ_PENDING,%d0
150 jeq ret_from_exception
151
152 pea ret_from_exception
153 jra do_softirq
154
155 137
156/* 138/*
157 * Handler for uninitialized and spurious interrupts. 139 * Handler for uninitialized and spurious interrupts.