Re: Probs with PCI bus master DMA to user space

2001-02-20 Thread David Woodhouse
[EMAIL PROTECTED] said: > The problem I have is: Is there an efficient way to lock the pages > which are accessed by the DMA? map_user_kiobuf, lock it, DMA into it, unlock it and unmap it again? -- dwmw2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: Probs with PCI bus master DMA to user space

2001-02-20 Thread Norbert Roos
Jeff Garzik wrote: > > On Tue, 20 Feb 2001, Norbert Roos wrote: > > > Jeff Garzik wrote: > > > > > > But the buffers are usually allocated with malloc() by any application > > > > which wants to use my driver.. otherwise my driver would have to offer a > > fd = open(...); > buf = mmap(fd, ...)

Re: Probs with PCI bus master DMA to user space

2001-02-20 Thread Jeff Garzik
On Tue, 20 Feb 2001, Norbert Roos wrote: > Jeff Garzik wrote: > > > > But the buffers are usually allocated with malloc() by any application > > > which wants to use my driver.. otherwise my driver would have to offer a > > > malloc-like function, but I can hardly force the application to use my

Re: Probs with PCI bus master DMA to user space

2001-02-20 Thread Norbert Roos
Jeff Garzik wrote: > > But the buffers are usually allocated with malloc() by any application > > which wants to use my driver.. otherwise my driver would have to offer a > > malloc-like function, but I can hardly force the application to use my > > own malloc function. > > If you are writing th

Re: Probs with PCI bus master DMA to user space

2001-02-20 Thread Jeff Garzik
On Tue, 20 Feb 2001, Norbert Roos wrote: > > Allocate the buffers in the kernel and mmap() them into user space > > But the buffers are usually allocated with malloc() by any application > which wants to use my driver.. otherwise my driver would have to offer a > malloc-like function, but I can h

Re: Probs with PCI bus master DMA to user space

2001-02-20 Thread Norbert Roos
> Allocate the buffers in the kernel and mmap() them into user space But the buffers are usually allocated with malloc() by any application which wants to use my driver.. otherwise my driver would have to offer a malloc-like function, but I can hardly force the application to use my own malloc f

Re: Probs with PCI bus master DMA to user space

2001-02-20 Thread Alan Cox
> I'm currently writing a driver which wants to transfer data between main > memory and a PCI device. The data buffers are allocated by the program > which uses the driver and therefore lie in the user space. Pointers to Allocate the buffers in the kernel and mmap() them into user space - To unsu

Probs with PCI bus master DMA to user space

2001-02-20 Thread Norbert Roos
Hello! I think the following is general problem, but i haven't found any information about that yet.. I'm currently writing a driver which wants to transfer data between main memory and a PCI device. The data buffers are allocated by the program which uses the driver and therefore lie in the us