On Mon, Mar 17, 2025 at 01:29:05PM +0800, Bingbu Cao wrote: > Why not update udmabuf to make it work with both vmap_pfns() and > vmap()? As only the udmabuf knows it is actually working on? > > I don't think it's a good idea to hack the common API, the WARN_ON() > is really a mandatory check, and current case is a good example. What non-page backed memory does udmabuf try to work on, and more importantly how does it actually work on them given that the normal DMA APIs require page backed memory. Or is this just made it up and it doesn't work at all given that it also tries to dma map to the fake miscdevice struct device which can't work for most cases? Mapping non-page memory is difficult and without having coherent theory of what non-page memory you are mapping and being very careful you are extremely unlikely to get it right.