Re: bus_dmamap_load_uio() and user data

2010-01-10 Thread Mark Tinguely
> > Ahh. I think bus_dmamap_load_uio() doesn't do deferred callbacks (i.e. > > mandates BUS_DMA_NOWAIT), and probably is always invoked from curthread. > > Even in the case of aio, the thread's vmspace is the effective one at the > > time bus_dmamap_load_uio() would be invoked, so in pract

Re: bus_dmamap_load_uio() and user data

2010-01-10 Thread Max Laier
On Friday 08 January 2010 17:13:29 John Baldwin wrote: > On Friday 08 January 2010 9:14:36 am Mark Tinguely wrote: > > > You should use the pmap from the thread in the uio structure. Similar > > > to this from the x86 bus_dma code: > > > > > > if (uio->uio_segflg == UIO_USERSPACE) { > >

Re: bus_dmamap_load_uio() and user data

2010-01-08 Thread John Baldwin
On Friday 08 January 2010 9:14:36 am Mark Tinguely wrote: > > You should use the pmap from the thread in the uio structure. Similar to > > this from the x86 bus_dma code: > > > > if (uio->uio_segflg == UIO_USERSPACE) { > > KASSERT(uio->uio_td != NULL, > >

Re: bus_dmamap_load_uio() and user data

2010-01-08 Thread Mark Tinguely
> You should use the pmap from the thread in the uio structure. Similar to > this from the x86 bus_dma code: > > if (uio->uio_segflg == UIO_USERSPACE) { > KASSERT(uio->uio_td != NULL, > ("bus_dmamap_load_uio: USERSPACE but no proc")); >

Re: bus_dmamap_load_uio() and user data

2010-01-08 Thread John Baldwin
On Thursday 07 January 2010 4:17:52 pm Mark Tinguely wrote: > > In the user space case of bus_dmamap_load_uio(), the calling thread is > stored in uio->uio_td, in which the user's pmap can be determined. > > The ARM processor, with the possible exception of the ARMv7 MPcore > with snoop control u

bus_dmamap_load_uio() and user data

2010-01-07 Thread Mark Tinguely
In the user space case of bus_dmamap_load_uio(), the calling thread is stored in uio->uio_td, in which the user's pmap can be determined. The ARM processor, with the possible exception of the ARMv7 MPcore with snoop control unit, needs to make the caches consistent before DMA. I noticed that the