Module Name:    src
Committed By:   skrll
Date:           Wed Jun  7 08:45:51 UTC 2017

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

Log Message:
fix tlb_record_asids 2nd arg to match usage - it's a maximum asid value
and not a mask


To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 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.91 src/sys/arch/mips/mips/locore_mips1.S:1.92
--- src/sys/arch/mips/mips/locore_mips1.S:1.91	Wed Jul 27 09:32:35 2016
+++ src/sys/arch/mips/mips/locore_mips1.S	Wed Jun  7 08:45:51 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore_mips1.S,v 1.91 2016/07/27 09:32:35 skrll Exp $	*/
+/*	$NetBSD: locore_mips1.S,v 1.92 2017/06/07 08:45:51 skrll Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -57,7 +57,7 @@
 #include <mips/asm.h>
 #include <mips/cpuregs.h>
 
-RCSID("$NetBSD: locore_mips1.S,v 1.91 2016/07/27 09:32:35 skrll Exp $")
+RCSID("$NetBSD: locore_mips1.S,v 1.92 2017/06/07 08:45:51 skrll Exp $")
 
 #include "assym.h"
 
@@ -1368,7 +1368,7 @@ LEAF(MIPSX(tlb_invalidate_all))
 END(MIPSX(tlb_invalidate_all))
 
 /*
- * u_int mipsN_tlb_record_asids(u_long *bitmap, uint32_t asid_mask)
+ * u_int mipsN_tlb_record_asids(u_long *bitmap, uint32_t asid_max)
  *
  * Scan the random part of the TLB looking at non-global entries and
  * record each ASID in use into the bitmap.  Additionally, return the
@@ -1402,7 +1402,8 @@ LEAF(MIPSX(tlb_record_asids))
 	nop
 	and	t0, MIPS1_TLB_PID
 	srl	t0, MIPS1_TLB_PID_SHIFT		# shift to low bits
-	and	t0, a1				# focus on asid_mask
+	bgt	t0, a1, 4f			# > ASID max? skip
+	 nop
 
 	srl	a2, t0, 3 + LONG_SCALESHIFT	# drop low 5 bits
 	sll	a2, LONG_SCALESHIFT		# make an index for the bitmap

Reply via email to