Skip to content

Commit 1aefe32

Browse files
vineetgarcgregkh
authored andcommitted
ARCv2: save r30 on kernel entry as gcc uses it for code-gen
commit ecd43afdbe72017aefe48080631eb625e177ef4d upstream. This is not exposed to userspace debugers yet, which can be done independently as a seperate patch ! Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 82a0d8a commit 1aefe32

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

arch/arc/include/asm/entry-arcv2.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
;
1717
; Now manually save: r12, sp, fp, gp, r25
1818

19+
PUSH r30
1920
PUSH r12
2021

2122
; Saving pt_regs->sp correctly requires some extra work due to the way
@@ -72,6 +73,7 @@
7273
POPAX AUX_USER_SP
7374
1:
7475
POP r12
76+
POP r30
7577

7678
.endm
7779

arch/arc/include/asm/ptrace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ struct pt_regs {
8484
unsigned long fp;
8585
unsigned long sp; /* user/kernel sp depending on where we came from */
8686

87-
unsigned long r12;
87+
unsigned long r12, r30;
8888

8989
/*------- Below list auto saved by h/w -----------*/
9090
unsigned long r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11;

0 commit comments

Comments
 (0)