Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips fix tlb_record_asids 2nd arg to match usa...



details:   https://anonhg.NetBSD.org/src/rev/68a9a4342558
branches:  trunk
changeset: 824505:68a9a4342558
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Jun 07 08:45:51 2017 +0000

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

diffstat:

 sys/arch/mips/mips/locore_mips1.S |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r fb3e5f8c1323 -r 68a9a4342558 sys/arch/mips/mips/locore_mips1.S
--- a/sys/arch/mips/mips/locore_mips1.S Wed Jun 07 08:10:31 2017 +0000
+++ b/sys/arch/mips/mips/locore_mips1.S Wed Jun 07 08:45:51 2017 +0000
@@ -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 @@
 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 @@
        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



Home | Main Index | Thread Index | Old Index