Jun 28, 2006, at 3:18 AM, Andrew Doran wrote: I made a few more changes An uncompiled & untested diff is attached: - pass l->l_proc to bus_dmamap_load() so we don't need to double buffer do this if you vslock the buffer! - remove spl calls in amr_ioctl() - pass transfer direction in ld_amr_dobio() Andrew <newdiff> -- thorpej
No.1 | | 435 bytes | |
Wed, Jun 28, 2006 at 10:44:25AM -0700, Jason Thorpe wrote:
Jun 28, 2006, at 3:18 AM, Andrew Doran wrote:
>I made a few more changes An uncompiled & untested diff is attached: > >- pass l->l_proc to bus_dmamap_load() so we don't need to double >buffer
do this if you vslock the buffer!
When calling uvm_vslock(), do we also need to PHLD() the process ?
No.2 | | 293 bytes | |
Jun 28, 2006, at 10:50 AM, Manuel Bouyer wrote:
>do this if you vslock the buffer! > When calling uvm_vslock(), do we also need to PHLD() the process ? You only need to PHLD if you going to do DMA to/from the stack. -- thorpej
No.3 | | 457 bytes | |
Wed, Jun 28, 2006 at 11:51:31AM -0700, Jason Thorpe wrote:
Jun 28, 2006, at 10:50 AM, Manuel Bouyer wrote:
>do this if you vslock the buffer! > >When calling uvm_vslock(), do we also need to PHLD() the process ?
You only need to PHLD if you going to do DMA to/from the stack.
The kernel stack, I guess ? So to do dma from/to a user-supplied buffer only uvm_vslock() is needed, right ?
No.4 | | 818 bytes | |
Jun 28, 2006, at 12:06 PM, Manuel Bouyer wrote:
Wed, Jun 28, 2006 at 11:51:31AM -0700, Jason Thorpe wrote: >> >Jun 28, 2006, at 10:50 AM, Manuel Bouyer wrote: >> do this if you vslock the buffer!
When calling uvm_vslock(), do we also need to PHLD() the process ? >> >You only need to PHLD if you going to do DMA to/from the stack. > The kernel stack, I guess ?
Right.
So to do dma from/to a user-supplied buffer only uvm_vslock() is needed, right ?
Right. Also, make sure you never load in interrupt context (because you have to lock the user's pmap to extract the physical addresses.)
No.5 | | 261 bytes | |
I made a few more changes An uncompiled & untested diff is attached: - pass l->l_proc to bus_dmamap_load() so we don't need to double buffer do this if you vslock the buffer! and vslock is fragile YAMAMT Takashi
No.6 | | 363 bytes | |
Thu, Jun 29, 2006 at 08:01:27AM +0900, YAMAMT Takashi wrote: I made a few more changes An uncompiled & untested diff is attached:
- pass l->l_proc to bus_dmamap_load() so we don't need to double buffer
do this if you vslock the buffer!
and vslock is fragile
Hum. So we should probably stick with the double-buffer then ?
No.7 | | 431 bytes | |
I made a few more changes An uncompiled & untested diff is attached:
- pass l->l_proc to bus_dmamap_load() so we don't need to double buffer
do this if you vslock the buffer!
and vslock is fragile
Hum. So we should probably stick with the double-buffer then ?