kmalloc/malloc for dma ?
From: Ran Shalit <hidden>
Date: 2016-03-09 09:18:58
From: Ran Shalit <hidden>
Date: 2016-03-09 09:18:58
On Wed, Mar 9, 2016 at 11:16 AM, Ran Shalit [off-list ref] wrote:
Hello, I have some sample code which uses 2 test application: 1. test application in kernel , which allocates buffer using kmalloc (GFP_KERNEL) 2. test application in userspace which allocates buffer using malloc
just to add that in the case (2) of userspace, the kernel driver use copy_from_user before dma transfer.
In both cases the buffers are DMA through PCI. I don't understand how is it that the buffers are allocated with malloc/kmalloc for DMA. Is there any idea ? Regards, Ran