linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: Stop irqsoff tracing if return to user with interrupts enabled
@ 2010-11-13  3:40 Todd Poynor
  2010-11-13  8:48 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Todd Poynor @ 2010-11-13  3:40 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Todd Poynor <toddpoynor@google.com>
---
 arch/arm/kernel/entry-common.S |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 8bfa987..b81d270 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -29,6 +29,13 @@ ret_fast_syscall:
 	ldr	r1, [tsk, #TI_FLAGS]
 	tst	r1, #_TIF_WORK_MASK
 	bne	fast_work_pending
+#if defined(CONFIG_TRACE_IRQFLAGS)
+	ldr     r1, [sp, #S_OFF + S_PSR]	@ get calling cpsr
+	tst	r1, #PSR_I_BIT
+	bne	1f
+	asm_trace_hardirqs_on
+1:
+#endif
 
 	/* perform architecture specific actions before user return */
 	arch_ret_to_user r1, lr
@@ -65,6 +72,13 @@ ret_slow_syscall:
 	tst	r1, #_TIF_WORK_MASK
 	bne	work_pending
 no_work_pending:
+#if defined(CONFIG_TRACE_IRQFLAGS)
+	ldr     r1, [sp, #S_PSR]		@ get calling cpsr
+	tst	r1, #PSR_I_BIT
+	bne	2f
+	asm_trace_hardirqs_on
+2:
+#endif
 	/* perform architecture specific actions before user return */
 	arch_ret_to_user r1, lr
 
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-13  9:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-13  3:40 [PATCH] ARM: Stop irqsoff tracing if return to user with interrupts enabled Todd Poynor
2010-11-13  8:48 ` Russell King - ARM Linux
2010-11-13  9:35   ` Todd Poynor
2010-11-13  9:38   ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).