diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2010-12-22 11:42:56 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-01-20 22:08:33 -0500 |
commit | 06ca2188eccbd7932636ac5bde2837297800480e (patch) | |
tree | 6eecdd819e8a96f04eda7fab9d85b04af9bdb06d /arch/powerpc | |
parent | 3cb5f1a3e58c0bd70d47d9907cc5c65192281dee (diff) |
powerpc/ppc32/tracing: Add stack frame to calls of trace_hardirqs_on/off
32-bit variant of the previous patch for 64-bit:
<<
When an interrupt occurs in userspace, we can call trace_hardirqs_on/off()
With one level stack. But if we have irqsoff tracing enabled,
it checks both CALLER_ADDR0 and CALLER_ADDR1. The second call
goes two stack frames up. If this is from user space, then there may
not exist a second stack....
>>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/entry_32.S | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index c22dc1ec1c94..56212bc0ab08 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -880,7 +880,18 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_47x) | |||
880 | */ | 880 | */ |
881 | andi. r10,r9,MSR_EE | 881 | andi. r10,r9,MSR_EE |
882 | beq 1f | 882 | beq 1f |
883 | /* | ||
884 | * Since the ftrace irqsoff latency trace checks CALLER_ADDR1, | ||
885 | * which is the stack frame here, we need to force a stack frame | ||
886 | * in case we came from user space. | ||
887 | */ | ||
888 | stwu r1,-32(r1) | ||
889 | mflr r0 | ||
890 | stw r0,4(r1) | ||
891 | stwu r1,-32(r1) | ||
883 | bl trace_hardirqs_on | 892 | bl trace_hardirqs_on |
893 | lwz r1,0(r1) | ||
894 | lwz r1,0(r1) | ||
884 | lwz r9,_MSR(r1) | 895 | lwz r9,_MSR(r1) |
885 | 1: | 896 | 1: |
886 | #endif /* CONFIG_TRACE_IRQFLAGS */ | 897 | #endif /* CONFIG_TRACE_IRQFLAGS */ |