summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/head.S
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2009-10-13 23:23:28 +0200
committerRalf Baechle <ralf@linux-mips.org>2009-11-02 12:00:07 +0100
commitc2ea1d56eaf084c66177eb5658ff4065e79b36ea (patch)
treefcc0a634a194dba00f730b54bdf6cf5f0f3b9de1 /arch/mips/kernel/head.S
parentcd847b7857b835f9730d6fc93c3f423fcacc50f7 (diff)
downloadlwn-c2ea1d56eaf084c66177eb5658ff4065e79b36ea.tar.gz
lwn-c2ea1d56eaf084c66177eb5658ff4065e79b36ea.zip
MIPS: Avoid potential hazard on Context register
set_saved_sp reads Context register. Avoid reading stale value from earlier incomplete write. Issue found and fixed for head.S by Chris Dearman <chris@mips.com>. Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/head.S')
-rw-r--r--arch/mips/kernel/head.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index 531ce7b16124..ea695d9605e9 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -191,6 +191,7 @@ NESTED(kernel_entry, 16, sp) # kernel entry point
/* Set the SP after an empty pt_regs. */
PTR_LI sp, _THREAD_SIZE - 32 - PT_SIZE
PTR_ADDU sp, $28
+ back_to_back_c0_hazard
set_saved_sp sp, t0, t1
PTR_SUBU sp, 4 * SZREG # init stack pointer