Subject: Re: bus dma in interrupt context
To: None <thorpej@nas.nasa.gov>
From: Lennart Augustsson <augustss@cs.chalmers.se>
List: tech-kern
Date: 07/24/1998 00:20:54
>  > Are the bus_dma functions supposed to be safe to call in an
>  > interrupt context?
>  > 
>  > I'm freeing some memory in an interrupt routine and I keep
>  > getting panics.
> 
> Err... they should be, yes... but if you're loading a DMA map, or whatever,
> you should protect that section w/ spl...().  If allocating memory, splimp().
> If loading a DMA map, w/ spl<whatever_you_device_interrupts_at>().
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.

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