Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm/pmap Fix a logic botch to actually apply the ASID li...



details:   https://anonhg.NetBSD.org/src/rev/9a2fd33144d1
branches:  trunk
changeset: 988628:9a2fd33144d1
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Oct 08 07:17:32 2021 +0000

description:
Fix a logic botch to actually apply the ASID limit returned by
pmap_md_tlb_asid_max.

diffstat:

 sys/uvm/pmap/pmap_tlb.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 9f17963321fe -r 9a2fd33144d1 sys/uvm/pmap/pmap_tlb.c
--- a/sys/uvm/pmap/pmap_tlb.c   Thu Oct 07 23:18:47 2021 +0000
+++ b/sys/uvm/pmap/pmap_tlb.c   Fri Oct 08 07:17:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_tlb.c,v 1.46 2021/10/02 14:28:05 skrll Exp $      */
+/*     $NetBSD: pmap_tlb.c,v 1.47 2021/10/08 07:17:32 skrll Exp $      */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.46 2021/10/02 14:28:05 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.47 2021/10/08 07:17:32 skrll Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -378,8 +378,9 @@
        kcpuset_set(ti->ti_kcpuset, cpu_index(curcpu()));
 #endif
 
-       if (ti->ti_asid_max == 0) {
-               ti->ti_asid_max = pmap_md_tlb_asid_max();
+       const tlb_asid_t asid_max = pmap_md_tlb_asid_max();
+       if (asid_max < ti->ti_asid_max) {
+               ti->ti_asid_max = asid_max;
                ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti->ti_asid_max);
        }
 



Home | Main Index | Thread Index | Old Index