summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-04-12 11:04:15 +0000
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 19:31:04 +0100
commit6dd04688520d7abe4883b2a79fa720291d76b140 (patch)
tree4d64b3bcad2b840ea6b8586ad018ea4077671c69 /arch/mips/kernel
parentac5d8c022f91d790888cc8c627b8010d3c31a300 (diff)
downloadop-kernel-dev-6dd04688520d7abe4883b2a79fa720291d76b140.zip
op-kernel-dev-6dd04688520d7abe4883b2a79fa720291d76b140.tar.gz
When simulating ll/sc compute the return EPC before modifying the
registers. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/traps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index f9a6a56..77f796b 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -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:
OpenPOWER on IntegriCloud