Module Name:    src
Committed By:   pooka
Date:           Mon Nov  8 18:09:38 UTC 2010

Modified Files:
        src/sys/arch/mips/mips: locore_mips1.S

Log Message:
In TLBRead, restore PID before doing the saves so that the caller's
TLB entries are used instead of the PID given as the argument.

from Alessandro Forin


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/mips/mips/locore_mips1.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/locore_mips1.S
diff -u src/sys/arch/mips/mips/locore_mips1.S:1.67 src/sys/arch/mips/mips/locore_mips1.S:1.68
--- src/sys/arch/mips/mips/locore_mips1.S:1.67	Mon Dec 14 00:46:06 2009
+++ src/sys/arch/mips/mips/locore_mips1.S	Mon Nov  8 18:09:38 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_mips1.S,v 1.67 2009/12/14 00:46:06 matt Exp $	*/
+/*	$NetBSD: locore_mips1.S,v 1.68 2010/11/08 18:09:38 pooka Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -925,12 +925,12 @@
 	tlbr					# Read from the TLB
 	mfc0	t2, MIPS_COP_0_TLB_HI		# fetch the hi entry
 	mfc0	t3, MIPS_COP_0_TLB_LOW		# fetch the low entry
-	sw	t2, 0(a1)
-	sw	t3, 4(a1)
 
 	mtc0	t0, MIPS_COP_0_TLB_HI		# restore PID
-	j	ra
 	mtc0	v1, MIPS_COP_0_STATUS		# Restore the status register
+	sw	t2, 0(a1)
+	j	ra
+	sw	t3, 4(a1)
 END(mips1_TLBRead)
 
 /*----------------------------------------------------------------------------

Reply via email to