summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-armv.S
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-06-25 16:55:58 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-07-02 10:56:10 +0100
commitdf295df6c391e322a06dea0d2bc3d22debd15fb9 (patch)
tree37436463cb6cc22a3b0ff4a1c96c66920ef5f53c /arch/arm/kernel/entry-armv.S
parent02fe2845d6a837ab02f0738f6cf4591a02cc88d4 (diff)
downloadlinux-df295df6c391e322a06dea0d2bc3d22debd15fb9.tar.bz2
ARM: entry: instrument svc undefined exception handler with irqtrace
Add irqtrace function calls to the undefined exception handler, so that we get sane lockdep traces from locking problems in undefined exception handlers. 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.S10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index c46bafa2f6dc..920dd3d07957 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -268,6 +268,10 @@ __und_svc:
svc_entry
#endif
+#ifdef CONFIG_TRACE_IRQFLAGS
+ bl trace_hardirqs_off
+#endif
+
@
@ call emulation code, which returns using r9 if it has emulated
@ the instruction, or the more conventional lr if we are to treat
@@ -300,6 +304,12 @@ __und_svc:
@ restore SPSR and restart the instruction
@
ldr r5, [sp, #S_PSR] @ Get SVC cpsr
+#ifdef CONFIG_TRACE_IRQFLAGS
+ tst r5, #PSR_I_BIT
+ bleq trace_hardirqs_on
+ tst r5, #PSR_I_BIT
+ blne trace_hardirqs_off
+#endif
svc_exit r5 @ return from exception
UNWIND(.fnend )
ENDPROC(__und_svc)