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 the DIAGNOSTIC function pmap_tlb_asid_count...
details: https://anonhg.NetBSD.org/src/rev/7d720102695d
branches: trunk
changeset: 830101:7d720102695d
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Feb 25 21:43:03 2018 +0000
description:
fix the DIAGNOSTIC function pmap_tlb_asid_count() to not expect
that TLBINFO_ASID_INUSE_P() returns just 0 or 1; the underlying
__BITMAP_ISSET() actually returns the matching bit nowadays, which
caused miscounting
fixes PR kern/53054 by Sevan Janiyan
diffstat:
sys/uvm/pmap/pmap_tlb.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r fd4ded767198 -r 7d720102695d sys/uvm/pmap/pmap_tlb.c
--- a/sys/uvm/pmap/pmap_tlb.c Sun Feb 25 21:06:40 2018 +0000
+++ b/sys/uvm/pmap/pmap_tlb.c Sun Feb 25 21:43:03 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_tlb.c,v 1.27 2018/02/25 16:44:31 jdolecek Exp $ */
+/* $NetBSD: pmap_tlb.c,v 1.28 2018/02/25 21:43:03 jdolecek 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.27 2018/02/25 16:44:31 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.28 2018/02/25 21:43:03 jdolecek Exp $");
/*
* Manages address spaces in a TLB.
@@ -409,7 +409,8 @@
{
size_t count = 0;
for (tlb_asid_t asid = 1; asid <= ti->ti_asid_max; asid++) {
- count += TLBINFO_ASID_INUSE_P(ti, asid);
+ if (TLBINFO_ASID_INUSE_P(ti, asid))
+ count++;
}
return count;
}
Home |
Main Index |
Thread Index |
Old Index