Message ID | 20221025205247.3264568-1-catalin.marinas@arm.com (mailing list archive) |
---|---|
Headers | show |
Series | mm: Allow kmalloc() allocations below ARCH_KMALLOC_MINALIGN | expand |
On Tue, Oct 25, 2022 at 09:52:45PM +0100, Catalin Marinas wrote: > To me, the ideal approach would be __dma annotations on pointers aimed > at DMA and using kernel tools like sparse to identify them. As a reviewer of drivers, and a subsystem maintainer, yes, I too would like this instead. It would make it much more obvious what is happening. > dma_kmalloc() would return such pointers. However, things get muddier > with scatterlists since functions like sg_set_page() don't have any such > pointer information (can we mark the offset as __dma instead?). Drivers don't always call dma_kmalloc() for pointers to pass to dma controllers. Heck, I doubt the majority do that at all today, that's the main problem overall that you are having. We can take the time and move the kernel to do this, perhaps that is the real solution that will work best over time here? thanks, greg k-h