aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-06-25 13:28:19 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-07-02 05:56:10 -0400
commitbc089602d206b2abc2d2e8e5324d90342cc0447b (patch)
tree6f5f062109d2756b92eff8545531fb5f12df3929
parentdf295df6c391e322a06dea0d2bc3d22debd15fb9 (diff)
ARM: entry: instrument usr exception handlers with irqsoff tracing
As we no longer re-enable interrupts in these exception handlers, add the irqsoff tracing calls to them so that the kernel tracks the state more accurately. Note that these calls are conditional on IRQSOFF_TRACER: kernel ----------> user ---------> kernel ^ irqs enabled ^ irqs disabled No kernel code can run on the local CPU until we've re-entered the kernel through one of the exception handlers - and userspace can not take any locks etc. So, the kernel doesn't care about the IRQ mask state while userspace is running unless we're doing IRQ off latency tracing. So, we can (and do) avoid the overhead of updating the IRQ mask state on every kernel->user and user->kernel transition. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/kernel/entry-armv.S17
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 920dd3d07957..f863ee79093e 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -421,6 +421,11 @@ ENDPROC(__pabt_svc)
421 .align 5 421 .align 5
422__dabt_usr: 422__dabt_usr:
423 usr_entry 423 usr_entry
424
425#ifdef CONFIG_IRQSOFF_TRACER
426 bl trace_hardirqs_off
427#endif
428
424 kuser_cmpxchg_check 429 kuser_cmpxchg_check
425 dabt_helper 430 dabt_helper
426 431
@@ -433,12 +438,12 @@ ENDPROC(__dabt_usr)
433 .align 5 438 .align 5
434__irq_usr: 439__irq_usr:
435 usr_entry 440 usr_entry
436 kuser_cmpxchg_check
437 441
438#ifdef CONFIG_IRQSOFF_TRACER 442#ifdef CONFIG_IRQSOFF_TRACER
439 bl trace_hardirqs_off 443 bl trace_hardirqs_off
440#endif 444#endif
441 445
446 kuser_cmpxchg_check
442 irq_handler 447 irq_handler
443 get_thread_info tsk 448 get_thread_info tsk
444 mov why, #0 449 mov why, #0
@@ -451,6 +456,11 @@ ENDPROC(__irq_usr)
451 .align 5 456 .align 5
452__und_usr: 457__und_usr:
453 usr_entry 458 usr_entry
459
460#ifdef CONFIG_IRQSOFF_TRACER
461 bl trace_hardirqs_off
462#endif
463
454 mov r2, r4 464 mov r2, r4
455 mov r3, r5 465 mov r3, r5
456 466
@@ -669,6 +679,11 @@ ENDPROC(__und_usr_unknown)
669 .align 5 679 .align 5
670__pabt_usr: 680__pabt_usr:
671 usr_entry 681 usr_entry
682
683#ifdef CONFIG_IRQSOFF_TRACER
684 bl trace_hardirqs_off
685#endif
686
672 pabt_helper 687 pabt_helper
673 mov r2, sp @ regs 688 mov r2, sp @ regs
674 bl do_PrefetchAbort @ call abort handler 689 bl do_PrefetchAbort @ call abort handler