diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-25 05:57:57 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-29 05:06:37 -0400 |
commit | 1613cc1119ecdb1bdb950da53065e615e4c4b8db (patch) | |
tree | 71718e744e862948772d03f84f20c17284f4da73 /arch/arm/kernel/entry-armv.S | |
parent | 198a0a927ab9c52a68297120ee6dd4e36a975b0e (diff) |
ARM: entry: no need to increase preempt count for IRQ handlers
irq_enter() and irq_exit() already take care of the preempt_count
handling for interrupts, which increment and decrement the hardirq
bits of the preempt count. So we can remove the preempt count handing
in our IRQ entry/exit assembly, like x86 did some 9 years ago.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-armv.S')
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 6855f6dd72d0..1e5f387c70ae 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -220,16 +220,12 @@ __irq_svc: | |||
220 | #ifdef CONFIG_TRACE_IRQFLAGS | 220 | #ifdef CONFIG_TRACE_IRQFLAGS |
221 | bl trace_hardirqs_off | 221 | bl trace_hardirqs_off |
222 | #endif | 222 | #endif |
223 | #ifdef CONFIG_PREEMPT | ||
224 | get_thread_info tsk | ||
225 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count | ||
226 | add r7, r8, #1 @ increment it | ||
227 | str r7, [tsk, #TI_PREEMPT] | ||
228 | #endif | ||
229 | 223 | ||
230 | irq_handler | 224 | irq_handler |
225 | |||
231 | #ifdef CONFIG_PREEMPT | 226 | #ifdef CONFIG_PREEMPT |
232 | str r8, [tsk, #TI_PREEMPT] @ restore preempt count | 227 | get_thread_info tsk |
228 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count | ||
233 | ldr r0, [tsk, #TI_FLAGS] @ get flags | 229 | ldr r0, [tsk, #TI_FLAGS] @ get flags |
234 | teq r8, #0 @ if preempt count != 0 | 230 | teq r8, #0 @ if preempt count != 0 |
235 | movne r0, #0 @ force flags to 0 | 231 | movne r0, #0 @ force flags to 0 |
@@ -432,23 +428,8 @@ __irq_usr: | |||
432 | bl trace_hardirqs_off | 428 | bl trace_hardirqs_off |
433 | #endif | 429 | #endif |
434 | 430 | ||
435 | get_thread_info tsk | ||
436 | #ifdef CONFIG_PREEMPT | ||
437 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count | ||
438 | add r7, r8, #1 @ increment it | ||
439 | str r7, [tsk, #TI_PREEMPT] | ||
440 | #endif | ||
441 | |||
442 | irq_handler | 431 | irq_handler |
443 | #ifdef CONFIG_PREEMPT | 432 | get_thread_info tsk |
444 | ldr r0, [tsk, #TI_PREEMPT] | ||
445 | str r8, [tsk, #TI_PREEMPT] | ||
446 | teq r0, r7 | ||
447 | ARM( strne r0, [r0, -r0] ) | ||
448 | THUMB( movne r0, #0 ) | ||
449 | THUMB( strne r0, [r0] ) | ||
450 | #endif | ||
451 | |||
452 | mov why, #0 | 433 | mov why, #0 |
453 | b ret_to_user_from_irq | 434 | b ret_to_user_from_irq |
454 | UNWIND(.fnend ) | 435 | UNWIND(.fnend ) |