kmalloc/__get_free_pages and SHMLBA
From: Jamie Iles <hidden>
Date: 2010-06-11 12:15:45
From: Jamie Iles <hidden>
Date: 2010-06-11 12:15:45
I'm writing a driver at the moment that mmap()'s a buffer into userspace and then performs DMA from the kernel buffer into the device. If I allocate with kmalloc()/__get_free_pages() is there anything that can be done to guarantee that the allocation is aligned to SHMLBA or do I need to try overallocating and do this myself? The alternative is to use vmalloc_user() and use vmalloc_to_page() to get the direct mapping addresses to perform the DMA mapping but I'd like to be able to DMA the whole buffer without the need for scatterlists. Jamie