Module Name: src
Committed By: skrll
Date: Thu Jun 30 12:57:35 UTC 2016
Modified Files:
src/sys/arch/mips/mips: pmap.c
Log Message:
Fix MIPS3_NO_PV_UNCACHED alias handling by looping through the pv_list
looking for bad aliases and removing the bad entries. That is, revert
to the code before the matt-mips64 merge.
Additionally, fix the pmap_update call to not use the (recently
removed/freed) pv for the pmap_t.
Fixes the following two PRs
PR/49903: Panic during installation on WorkPad Z50 (hpcmips) whilst
uncompressing base.tgz
PR/51226: Install bug for hpcmips NetBSD V7 using FTP Full installation
To generate a diff of this commit:
cvs rdiff -u -r1.222 -r1.223 src/sys/arch/mips/mips/pmap.c
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/pmap.c
diff -u src/sys/arch/mips/mips/pmap.c:1.222 src/sys/arch/mips/mips/pmap.c:1.223
--- src/sys/arch/mips/mips/pmap.c:1.222 Tue Jun 28 09:31:15 2016
+++ src/sys/arch/mips/mips/pmap.c Thu Jun 30 12:57:35 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.222 2016/06/28 09:31:15 skrll Exp $ */
+/* $NetBSD: pmap.c,v 1.223 2016/06/30 12:57:35 skrll Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.222 2016/06/28 09:31:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.223 2016/06/30 12:57:35 skrll Exp $");
/*
* Manages physical address maps.
@@ -2168,12 +2168,12 @@ again:
* be mapped with one index at any given time.
*/
- if (mips_cache_badalias(pv->pv_va, va)) {
- for (npv = pv; npv; npv = npv->pv_next) {
- vaddr_t nva = trunc_page(npv->pv_va);
- pmap_remove(npv->pv_pmap, nva,
- nva + PAGE_SIZE);
- pmap_update(npv->pv_pmap);
+ for (npv = pv; npv; npv = npv->pv_next) {
+ vaddr_t nva = trunc_page(npv->pv_va);
+ pmap_t npm = npv->pv_pmap;
+ if (mips_cache_badalias(nva, va)) {
+ pmap_remove(npm, nva, nva + PAGE_SIZE);
+ pmap_update(npm);
goto again;
}
}