Skip to content

Commit ea943a3

Browse files
author
Fox Snowpatch
committed
1 parent 1ecdccb commit ea943a3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

arch/powerpc/kernel/optprobes_head.S

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
#include <asm/asm-offsets.h>
1111

1212
#ifdef CONFIG_PPC64
13-
#define SAVE_30GPRS(base) SAVE_GPRS(2, 31, base)
14-
#define REST_30GPRS(base) REST_GPRS(2, 31, base)
13+
#define SAVE_NEEDED_GPRS(base) SAVE_GPRS(2, 12, base); SAVE_GPRS(14, 31, base)
14+
#define REST_NEEDED_GPRS(base) REST_GPRS(2, 12, base); REST_GPRS(14, 31, base)
1515
#define TEMPLATE_FOR_IMM_LOAD_INSNS nop; nop; nop; nop; nop
1616
#else
17-
#define SAVE_30GPRS(base) stmw r2, GPR2(base)
18-
#define REST_30GPRS(base) lmw r2, GPR2(base)
17+
#define SAVE_NEEDED_GPRS(base) stmw r2, GPR2(base)
18+
#define REST_NEEDED_GPRS(base) lmw r2, GPR2(base)
1919
#define TEMPLATE_FOR_IMM_LOAD_INSNS nop; nop; nop
2020
#endif
2121

@@ -45,7 +45,7 @@ optprobe_template_entry:
4545
/* Save the previous SP into stack */
4646
addi r0,r1,INT_FRAME_SIZE
4747
PPC_STL r0,GPR1(r1)
48-
SAVE_30GPRS(r1)
48+
SAVE_NEEDED_GPRS(r1)
4949
/* Save SPRS */
5050
mfmsr r5
5151
PPC_STL r5,_MSR(r1)
@@ -123,7 +123,7 @@ optprobe_template_call_emulate:
123123
PPC_LL r5,_CCR(r1)
124124
mtcr r5
125125
REST_GPR(0,r1)
126-
REST_30GPRS(r1)
126+
REST_NEEDED_GPRS(r1)
127127
/* Restore the previous SP */
128128
addi r1,r1,INT_FRAME_SIZE
129129

0 commit comments

Comments
 (0)