Subject: Re: panic: pmap_ptefault on 1.4.2_ALPHA
To: Todd Whitesel <toddpw@best.com>
From: Anders Magnusson <ragge@ludd.luth.se>
List: port-vax
Date: 01/23/2000 04:40:28
[...]
> 
> panic: pmap_ptefault
> syncing disks... done
> 
Oh yes, of course, a quick glance at the code shows that this should happen
once in a while. Please try the following patch to pmap.c; if it works then
tell me and I will send a pullup request for it.

-- Ragge


Index: pmap.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/vax/vax/pmap.c,v
retrieving revision 1.61.2.1
diff -c -r1.61.2.1 pmap.c
*** pmap.c	1999/07/12 19:24:42	1.61.2.1
--- pmap.c	2000/01/23 12:35:20
***************
*** 624,632 ****
  			paddr_t phys;
  			struct vm_page *pg;
  
! 			pg = uvm_pagealloc(NULL, 0, NULL, 0);
! 			if (pg == NULL)
! 				panic("pmap_ptefault"); /* XXX */
  			phys = VM_PAGE_TO_PHYS(pg);
  			bzero((caddr_t)(phys|KERNBASE), NBPG);
  			pmap_kenter_pa(ptaddr, phys,
--- 624,638 ----
  			paddr_t phys;
  			struct vm_page *pg;
  
! 			for (;;) {
! 				pg = uvm_pagealloc(NULL, 0, NULL, 0);
! 				if (pg != NULL)
! 					break;
! 				if (pmap == pmap_kernel())
! 					panic("pmap_enter: no free pages");
! 				else
! 					uvm_wait("pmap_enter");
! 			}
  			phys = VM_PAGE_TO_PHYS(pg);
  			bzero((caddr_t)(phys|KERNBASE), NBPG);
  			pmap_kenter_pa(ptaddr, phys,