Subject: Re: current DEBUG, DIAGNOSTIC, LOCKDEBUG kernel won't boot
To: None <tech-kern@NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: tech-kern
Date: 12/12/2006 15:48:20
On Tue, Dec 12, 2006 at 09:10:45AM +0100, Martin Husemann wrote:
> This is a DEBUG+DIAGNOSTIC+LOCKDEBUG kernel on mac68k, sources from ~9 hours
> ago:
> 
> init: copying out path `/sbin/init' 11   
>                                       
> pool_get(PR_WAITOK) with held simple_lock 0x4f34f78 CPU 0 ../../../../uvm/uvm_fault.c:888
> ?(?)     
> simple_lock_only_held(0,18b9c8) at 0
> assert_sleepable(0) + 26            
> pool_get(1ce7d4,2) + d2 
> uvm_mapent_alloc(1d4af8,0,1,0,0) + 3c
> uvm_map(1d4af8,594abd0,400000,0,ffffffff,ffffffff,0,1801727) + 52
> uvm_km_alloc(1d4af8,400000,0,1000004,0) + 7c                     
> pmap_enter(4f2bf78,ffffc000,2970000,7,22) + 4a6
> uvm_fault_internal(4f2adc0,ffffc000,2,0) + 1b62
> trap(8,4a1,ffffcff5) + 5a0                     
> copyout(4f2cf18) + 36     
> proc_trampoline() + 2

Ok, it is not a general problem, but seems m68k specific. I would
like to add UVM_KMF_NOWAIT here, but together with UVM_KMF_WAITVA
this looks bogus (though I think UVM_KMF_WAITVA is ignored in this
call).

Martin

Index: pmap_motorola.c
===================================================================
RCS file: /cvsroot/src/sys/arch/m68k/m68k/pmap_motorola.c,v
retrieving revision 1.21
diff -c -u -r1.21 pmap_motorola.c
--- pmap_motorola.c	16 Sep 2006 17:31:13 -0000	1.21
+++ pmap_motorola.c	12 Dec 2006 14:43:55 -0000
@@ -1164,7 +1164,7 @@
 	if (pmap->pm_ptab == NULL)
 		pmap->pm_ptab = (pt_entry_t *)
 		    uvm_km_alloc(pt_map, M68K_MAX_PTSIZE, 0,
-		    UVM_KMF_VAONLY | UVM_KMF_WAITVA);
+		    UVM_KMF_VAONLY | UVM_KMF_WAITVA | UVM_KMF_NOWAIT);
 
 	/*
 	 * Segment table entry not valid, we need a new PT page