Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 Call pmap_free_l2_bucket for the kernel p...
details: https://anonhg.NetBSD.org/src/rev/966562030388
branches: trunk
changeset: 328880:966562030388
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Apr 22 14:00:45 2014 +0000
description:
Call pmap_free_l2_bucket for the kernel pmap so that l2b_occupancy is
updated. pmap_free_l2_bucket already deals with the kernel pmap properly.
ok matt@
Should fix the
panic: kernel debugging assertion "mappings <= l2b->l2b_occupancy" failed:
file "/usr/src/sys/arch/arm/arm32/pmap.c", line 3838
problem reported on port-arm by Joachim Thiemann
diffstat:
sys/arch/arm/arm32/pmap.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diffs (58 lines):
diff -r bdc065756290 -r 966562030388 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Tue Apr 22 13:20:58 2014 +0000
+++ b/sys/arch/arm/arm32/pmap.c Tue Apr 22 14:00:45 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.289 2014/04/22 12:13:09 skrll Exp $ */
+/* $NetBSD: pmap.c,v 1.290 2014/04/22 14:00:45 skrll Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -216,7 +216,7 @@
#include <arm/locore.h>
//#include <arm/arm32/katelib.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.289 2014/04/22 12:13:09 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.290 2014/04/22 14:00:45 skrll Exp $");
//#define PMAP_DEBUG
#ifdef PMAP_DEBUG
@@ -1582,7 +1582,6 @@
static void
pmap_free_l2_bucket(pmap_t pm, struct l2_bucket *l2b, u_int count)
{
- KASSERT(pm != pmap_kernel());
KDASSERT(count <= l2b->l2b_occupancy);
/*
@@ -2918,9 +2917,7 @@
*/
l2pte_reset(ptep);
PTE_SYNC_CURRENT(pm, ptep);
- if (pm != pmap_kernel()) {
- pmap_free_l2_bucket(pm, l2b, PAGE_SIZE / L2_S_SIZE);
- }
+ pmap_free_l2_bucket(pm, l2b, PAGE_SIZE / L2_S_SIZE);
pmap_release_pmap_lock(pm);
pool_put(&pmap_pv_pool, pv);
@@ -3226,8 +3223,7 @@
panic("pmap_enter: "
"no pv entries");
- if (pm != pmap_kernel())
- pmap_free_l2_bucket(pm, l2b, 0);
+ pmap_free_l2_bucket(pm, l2b, 0); /* XXX Why? */
UVMHIST_LOG(maphist, " <-- done (ENOMEM)",
0, 0, 0, 0);
return (ENOMEM);
@@ -3581,8 +3577,8 @@
}
}
- if (pm != pmap_kernel())
- pmap_free_l2_bucket(pm, l2b, mappings);
+
+ pmap_free_l2_bucket(pm, l2b, mappings);
pm->pm_stats.resident_count -= mappings / (PAGE_SIZE/L2_S_SIZE);
}
Home |
Main Index |
Thread Index |
Old Index