Module Name: src
Committed By: tsutsui
Date: Tue Mar 8 15:01:03 UTC 2011
Modified Files:
src/sys/arch/mips/mips: lock_stubs_ras.S
Log Message:
Put NOPs to avoid load delay hazard on R3000.
Fixes TLB miss panic in ras_mutex_spin_exit() on NWS-3470D.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/mips/lock_stubs_ras.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/mips/lock_stubs_ras.S
diff -u src/sys/arch/mips/mips/lock_stubs_ras.S:1.1 src/sys/arch/mips/mips/lock_stubs_ras.S:1.2
--- src/sys/arch/mips/mips/lock_stubs_ras.S:1.1 Sun Feb 20 07:45:47 2011
+++ src/sys/arch/mips/mips/lock_stubs_ras.S Tue Mar 8 15:01:02 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: lock_stubs_ras.S,v 1.1 2011/02/20 07:45:47 matt Exp $ */
+/* $NetBSD: lock_stubs_ras.S,v 1.2 2011/03/08 15:01:02 tsutsui Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -377,6 +377,7 @@
*/
LEAF(ras_mutex_spin_exit)
PTR_L t2, L_CPU(MIPS_CURLWP)
+ nop
#if defined(DIAGNOSTIC)
INT_L t0, MTX_LOCK(a0)
nop
@@ -392,7 +393,6 @@
*/
#ifdef PARANOIA
INT_L a2, MTX_IPL(a0)
- nop
#endif
INT_L a0, CPU_INFO_MTX_OLDSPL(t2)
@@ -408,6 +408,7 @@
* If the IPL doesn't change, nothing to do
*/
INT_L a1, CPU_INFO_CPL(t2)
+ nop
#ifdef PARANOIA
sltu v0, a1, a2 # v0 = cpl < mtx_ipl