Subject: Re: bus dma in interrupt context
To: Lennart Augustsson <augustss@cs.chalmers.se>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 07/23/1998 15:08:53
On Fri, 24 Jul 1998 00:20:54 +0200 (MET DST) 
 Lennart Augustsson <augustss@cs.chalmers.se> wrote:

 > I'm not sure how I can protect against what is happening since the
 > code that is interrupted when I free some memory isn't my code.

Argh, I see.

Ok, so the uvm_map is probably using kernel_map, which bus_dmamem_unmap()
also uses internally (so as not to consume all of kmem_map).

Ok, my answer to your question is "no, right now you cannot use dmamem_alloc
or dmamem_free in an interrupt context"... until we figure out what to do
about this, that is.

 > 
 > Here's the panic stack:
 > panic
 > lockmgr
 > uvm_unmap
 > uvm_km_free
 > _bus_dmamem_unmap
 > uhci_freemem
 > uhci_ctrl_done
 > uhci_ii_done
 > uhci_check_intr
 > uhci_intr
 > Xintr11
 > --- interrupt
 > lockmgr
 > uvm_map
 > uvm_km_alloc1
 > pmap_init
 > pmap_create
 > uvmspace_init
 > uvmspace_alloc
 > uvmspace_exec
 > sys_execve
 > syscall
 > 
 >         -- Lennart

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 650 940 5942