Re: [PATCH v6 3/4] tracing: Use vmap_page_range() to map memmap ring buffer

From: Guenter Roeck
Date: Sun Apr 06 2025 - 13:39:40 EST


On Wed, Apr 02, 2025 at 10:49:06AM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@xxxxxxxxxxx>
>
> The code to map the physical memory retrieved by memmap currently
> allocates an array of pages to cover the physical memory and then calls
> vmap() to map it to a virtual address. Instead of using this temporary
> array of struct page descriptors, simply use vmap_page_range() that can
> directly map the contiguous physical memory to a virtual address.
>
> Link: https://lore.kernel.org/all/CAHk-=whUOfVucfJRt7E0AH+GV41ELmS4wJqxHDnui6Giddfkzw@xxxxxxxxxxxxxx/
>
> Suggested-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
> ---
> kernel/trace/trace.c | 33 ++++++++++++++++-----------------
...
> + area = get_vm_area(size, VM_IOREMAP);

non-MMU builds (xtensa:nommu_kc705_defconfig):

kernel/trace/trace.o:(.init.literal+0x250): undefined reference to `get_vm_area'

Guenter