mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-16 13:34:30 +00:00
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>
This commit is contained in:
parent
3cb5f1a3e5
commit
06ca2188ec
@ -880,7 +880,18 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_47x)
|
|||||||
*/
|
*/
|
||||||
andi. r10,r9,MSR_EE
|
andi. r10,r9,MSR_EE
|
||||||
beq 1f
|
beq 1f
|
||||||
|
/*
|
||||||
|
* Since the ftrace irqsoff latency trace checks CALLER_ADDR1,
|
||||||
|
* which is the stack frame here, we need to force a stack frame
|
||||||
|
* in case we came from user space.
|
||||||
|
*/
|
||||||
|
stwu r1,-32(r1)
|
||||||
|
mflr r0
|
||||||
|
stw r0,4(r1)
|
||||||
|
stwu r1,-32(r1)
|
||||||
bl trace_hardirqs_on
|
bl trace_hardirqs_on
|
||||||
|
lwz r1,0(r1)
|
||||||
|
lwz r1,0(r1)
|
||||||
lwz r9,_MSR(r1)
|
lwz r9,_MSR(r1)
|
||||||
1:
|
1:
|
||||||
#endif /* CONFIG_TRACE_IRQFLAGS */
|
#endif /* CONFIG_TRACE_IRQFLAGS */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user