March 18, 2019
6 p.m.
On Mon, 2019-03-18 at 12:55 +0200, Ranran wrote:
Hello,
Does vmalloc_to_page() returns contiguous physical memory ? I ask becuase I see that its return value is used for DMA and DMA uses contiguous memory. see here:
https://elixir.bootlin.com/linux/latest/source/drivers/mtd/nand/onenand/sams...
Yet, in vmalloc_to_page implementation: https://elixir.bootlin.com/linux/v4.5/source/mm/vmalloc.c#L234 it does not seem that it creates a contiguous allocation.
That is correct, vmalloc_to_page does not create anything. All it does is find (and return) the page address of a single vmalloc address. If you have a vmalloc buffer larger than PAGE_SIZE, you will have to call vmalloc_to_page to find each individual page. -- All Rights Reversed.