Skip to content

Commit

Permalink
ARCv2: save r30 on kernel entry as gcc uses it for code-gen
Browse files Browse the repository at this point in the history
commit ecd43af 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>
  • Loading branch information
Vineet Gupta authored and Greg Kroah-Hartman committed May 3, 2017
1 parent 4684be1 commit 9cbf433
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions arch/arc/include/asm/entry-arcv2.h
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
;
; Now manually save: r12, sp, fp, gp, r25

PUSH r30
PUSH r12

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

.endm

2 changes: 1 addition & 1 deletion arch/arc/include/asm/ptrace.h
Original file line number Diff line number Diff line change
@@ -84,7 +84,7 @@ struct pt_regs {
unsigned long fp;
unsigned long sp; /* user/kernel sp depending on where we came from */

unsigned long r12;
unsigned long r12, r30;

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

0 comments on commit 9cbf433

Please sign in to comment.