summaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm/entry.h
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-06-22 12:38:59 +0530
committerVineet Gupta <vgupta@synopsys.com>2013-06-22 19:23:26 +0530
commit352c1d95e3220d0ea33cefac5c1f0deb2c4470c6 (patch)
tree2e487e17b6c45610ae819e01be6a7a0f534c35e8 /arch/arc/include/asm/entry.h
parent359105bdb06f8421fd8e69ae47fd052e398b6778 (diff)
downloadop-kernel-dev-352c1d95e3220d0ea33cefac5c1f0deb2c4470c6.zip
op-kernel-dev-352c1d95e3220d0ea33cefac5c1f0deb2c4470c6.tar.gz
ARC: stop using pt_regs->orig_r8
Historically, pt_regs have had orig_r8, an overloaded container for (1) backup copy of r8 (syscall number Trap Exceptions) (2) additional system state: (syscall/Exception/Interrupt) There is no point in keeping (1) since syscall number is never clobbered in-place, in pt_regs, unlike r0 which duals as first syscall arg as well as syscall return value and in case of syscall restart, the orig arg0 needs restoring (from orig_r0) after having been updated in-place with syscall ret value. This further paves way to convert (2) to contain ECR itself (rather than current madeup values) Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include/asm/entry.h')
-rw-r--r--arch/arc/include/asm/entry.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/arch/arc/include/asm/entry.h b/arch/arc/include/asm/entry.h
index 72a7ed4..de01bc8 100644
--- a/arch/arc/include/asm/entry.h
+++ b/arch/arc/include/asm/entry.h
@@ -422,18 +422,7 @@
* Save scratch regs for sys calls
*-------------------------------------------------------------*/
.macro SAVE_ALL_TRAP
- /*
- * Setup pt_regs->orig_r8.
- * Encode syscall number (r8) in upper short word of event type (r9)
- * N.B. #1: This is already endian safe (see ptrace.h)
- * #2: Only r9 can be used as scratch as it is already clobbered
- * and it's contents are no longer needed by the latter part
- * of exception prologue
- */
- lsl r9, r8, 16
- or r9, r9, orig_r8_IS_SCALL
-
- SAVE_ALL_EXCEPTION r9
+ SAVE_ALL_EXCEPTION orig_r8_IS_SCALL
.endm
/*--------------------------------------------------------------
OpenPOWER on IntegriCloud