linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Avoid potential hazard on Context register
@ 2009-10-11  6:07 Chris Dearman
  2009-10-11 13:39 ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Dearman @ 2009-10-11  6:07 UTC (permalink / raw)
  To: linux-mips

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-10-12  3:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-11  6:07 [PATCH] Avoid potential hazard on Context register Chris Dearman
2009-10-11 13:39 ` Ralf Baechle
2009-10-11 14:53   ` Ralf Baechle
2009-10-11 20:26     ` Chris Dearman
2009-10-12  3:20       ` Ralf Baechle
2009-10-11 20:05   ` Chris Dearman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).