File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
arch/powerpc/kernel/trace Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 33
33
* and then arrange for the ftrace function to be called.
34
34
*/
35
35
.macro ftrace_regs_entry allregs
36
+ /* Create a minimal stack frame for representing B */
37
+ PPC_STLU r1, -STACK_FRAME_MIN_SIZE(r1)
38
+
36
39
/* Create our stack frame + pt_regs */
37
40
PPC_STLU r1,-SWITCH_FRAME_SIZE(r1)
38
41
42
45
43
46
#ifdef CONFIG_PPC64
44
47
/* Save the original return address in A's stack frame */
45
- std r0, LRSAVE+SWITCH_FRAME_SIZE(r1)
48
+ std r0, LRSAVE+SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE (r1)
46
49
/* Ok to continue? */
47
50
lbz r3, PACA_FTRACE_ENABLED(r13)
48
51
cmpdi r3, 0
77
80
mflr r7
78
81
/* Save it as pt_regs->nip */
79
82
PPC_STL r7, _NIP(r1)
83
+ /* Also save it in B's stackframe header for proper unwind */
84
+ PPC_STL r7, LRSAVE+SWITCH_FRAME_SIZE(r1)
80
85
/* Save the read LR in pt_regs->link */
81
86
PPC_STL r0, _LINK(r1)
82
87
142
147
#endif
143
148
144
149
/* Pop our stack frame */
145
- addi r1, r1, SWITCH_FRAME_SIZE
150
+ addi r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
146
151
147
152
#ifdef CONFIG_LIVEPATCH_64
148
153
/* Based on the cmpd above, if the NIP was altered handle livepatch */
You can’t perform that action at this time.
0 commit comments