mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
When simulating ll/sc compute the return EPC before modifying the
registers. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
ac5d8c022f
commit
6dd0468852
1 changed files with 3 additions and 2 deletions
|
|
@ -408,9 +408,10 @@ static inline void simulate_ll(struct pt_regs *regs, unsigned int opcode)
|
|||
|
||||
preempt_enable();
|
||||
|
||||
compute_return_epc(regs);
|
||||
|
||||
regs->regs[(opcode & RT) >> 16] = value;
|
||||
|
||||
compute_return_epc(regs);
|
||||
return;
|
||||
|
||||
sig:
|
||||
|
|
@ -459,9 +460,9 @@ static inline void simulate_sc(struct pt_regs *regs, unsigned int opcode)
|
|||
goto sig;
|
||||
}
|
||||
|
||||
compute_return_epc(regs);
|
||||
regs->regs[reg] = 1;
|
||||
|
||||
compute_return_epc(regs);
|
||||
return;
|
||||
|
||||
sig:
|
||||
|
|
|
|||
Loading…
Reference in a new issue