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 MIPS3_NO_PV_UNCACHED alias handling b...



details:   https://anonhg.NetBSD.org/src/rev/611acb89a7a3
branches:  trunk
changeset: 816327:611acb89a7a3
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Jun 30 12:57:35 2016 +0000

description:
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

diffstat:

 sys/arch/mips/mips/pmap.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (37 lines):

diff -r 645d5d971e43 -r 611acb89a7a3 sys/arch/mips/mips/pmap.c
--- a/sys/arch/mips/mips/pmap.c Thu Jun 30 12:56:27 2016 +0000
+++ b/sys/arch/mips/mips/pmap.c Thu Jun 30 12:57:35 2016 +0000
@@ -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 @@
                         * 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;
                                }
                        }



Home | Main Index | Thread Index | Old Index