aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/process.c
diff options
context:
space:
mode:
authorLiav Rehana <liavr@mellanox.com>2017-06-15 11:44:00 +0300
committerVineet Gupta <vgupta@synopsys.com>2017-08-28 15:17:36 -0700
commit28923f6b74060b183207a373ddae4ce4948cabea (patch)
treec2c393d1e3821cd51942614d94146f2af9601d0e /arch/arc/kernel/process.c
parentARC: [plat-eznps] handle extra aux regs #1: save/restore on context switch (diff)
downloadlinux-dev-28923f6b74060b183207a373ddae4ce4948cabea.tar.xz
linux-dev-28923f6b74060b183207a373ddae4ce4948cabea.zip
ARC: [plat-eznps] handle extra aux regs #2: kernel/entry exit
Preserve eflags and gpa1 aux during entry/exit into kernel as these could be modified by kernel mode These registers used by compare exchange instructions. - GPA1 is used for compare value, - EFLAGS got bit reflects atomic operation response. EFLAGS is zeroed for each new user task so it won't get its parent value. Signed-off-by: Liav Rehana <liavr@mellanox.com> Signed-off-by: Noam Camus <noamc@ezchip.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to '')
-rw-r--r--arch/arc/kernel/process.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c
index 5c631a111240..5ac3b547453f 100644
--- a/arch/arc/kernel/process.c
+++ b/arch/arc/kernel/process.c
@@ -234,6 +234,10 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long usp)
*/
regs->status32 = STATUS_U_MASK | STATUS_L_MASK | ISA_INIT_STATUS_BITS;
+#ifdef CONFIG_EZNPS_MTM_EXT
+ regs->eflags = 0;
+#endif
+
/* bogus seed values for debugging */
regs->lp_start = 0x10;
regs->lp_end = 0x80;