Subject: Re: x86 bus_dmamem_alloc vs BUS_DMA_NOWAIT
To: None <firstname.lastname@example.org>
From: YAMAMOTO Takashi <email@example.com>
Date: 11/24/2005 19:45:40
> the x86 bus_dmamem_alloc() doesn't look at the BUS_DMA_NOWAIT when calling
> uvm_km_alloc(), as a result, an assertion can be triggered in uvm_map_prepare
> if called from interrupt context with BUS_DMA_NOWAIT. For example see this
> stack trace sent by John R. Shannon in private mail:
> panic: kernel diagnostic assertion "doing_shutdown || curlwp != NULL || (map->flags & VM_MAP_INTRSAFE)" failed: file "/usr/src/sys/uvm/uvm_map.c", line 834
> The attached patch should fix this (just translate BUS_DMA_NOWAIT to
> UVM_KMF_NOWAIT). Does it looks right ?
your patch is correct. but i don't think that it fix the problem.
you can't use kernel_map from interrupt context.