Subject: panic: pmap_remove_pv: not on list
To: None <port-powerpc@NetBSD.ORG>
From: Tsubai Masanari <tsubai@iri.co.jp>
List: port-powerpc
Date: 04/29/1998 04:47:16
I sometimes get:

panic: pmap_remove_pv: not on list

on PowerMac (and perhaps other powerpc ports, too).  The following patch
seems to fix the problem.  Is this a correct fix?

*** pmap.c.orig	Tue Jan 13 22:52:23 1998
--- pmap.c	Mon Apr 27 06:32:47 1998
***************
*** 1280,1285 ****
--- 1280,1286 ----
  				asm volatile ("sync");
  				tlbie(va);
  				tlbsync();
+ 				goto next;
  			}
  		for (ptp = ptable + (idx ^ ptab_mask) * 8, i = 8; --i >= 0; ptp++)
  			if ((ptp->pte_hi & PTE_VALID)
***************
*** 1289,1294 ****
--- 1290,1296 ----
  				asm volatile ("sync");
  				tlbie(va);
  				tlbsync();
+ 				goto next;
  			}
  		for (po = potable[idx].lh_first; po; po = npo) {
  			npo = po->po_list.le_next;
***************
*** 1296,1303 ****
--- 1298,1307 ----
  				pmap_remove_pv(idx, va, pind, &po->po_pte);
  				LIST_REMOVE(po, po_list);
  				pofree(po, 1);
+ 				goto next;
  			}
  		}
+ next:
  	}
  	splx(s);
  }