From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Tue, 20 Dec 2016 10:38:28 +0100 Subject: Driver to allow DMA from user space In-Reply-To: References: Message-ID: <20161220093828.GA13045@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mon, Dec 19, 2016 at 06:08:47PM +0200, Ran Shalit wrote: > Hello, > > I want to use DMA from userspace. Why? > I already use dma in kernel, and now I want can create a character > device which will be responsible for this. Why? > The only problem is that I want to use the same memory which was > allocated in kernel with dma_alloc_coherent. Why? > Is it correct to use mmap in order to use the phsyical memory which > was allocated with dma_alloc_coherent ? > > If it's that simple it can be surely helpful, and the simple driver > which wraps dma_alloc_coherent can do the job for dmaing from > userspace. Have you looked at the uio driver interface? But again, why? What problem are you trying to solve here? thanks, greg k-h