linux-mips
[Top] [All Lists]

[PATCH] Avoid potential hazard on Context register

To: linux-mips <linux-mips@linux-mips.org>
Subject: [PATCH] Avoid potential hazard on Context register
From: Chris Dearman <chris@mips.com>
Date: Sat, 10 Oct 2009 23:07:21 -0700
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)
set_saved_sp reads Context register. Avoid reading stale value from earlier incomplete write

Signed-off-by: Chris Dearman <chris@mips.com>
---

 arch/mips/kernel/head.S |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index 531ce7b..ea695d9 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



<Prev in Thread] Current Thread [Next in Thread>