Commit 6dd04688 authored by Ralf Baechle's avatar Ralf Baechle

When simulating ll/sc compute the return EPC before modifying the

registers.
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent ac5d8c02
...@@ -408,9 +408,10 @@ static inline void simulate_ll(struct pt_regs *regs, unsigned int opcode) ...@@ -408,9 +408,10 @@ static inline void simulate_ll(struct pt_regs *regs, unsigned int opcode)
preempt_enable(); preempt_enable();
compute_return_epc(regs);
regs->regs[(opcode & RT) >> 16] = value; regs->regs[(opcode & RT) >> 16] = value;
compute_return_epc(regs);
return; return;
sig: sig:
...@@ -459,9 +460,9 @@ static inline void simulate_sc(struct pt_regs *regs, unsigned int opcode) ...@@ -459,9 +460,9 @@ static inline void simulate_sc(struct pt_regs *regs, unsigned int opcode)
goto sig; goto sig;
} }
compute_return_epc(regs);
regs->regs[reg] = 1; regs->regs[reg] = 1;
compute_return_epc(regs);
return; return;
sig: sig:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment