Subject: linux-next: build failure after merge of the ftrace tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 11 Mar 2025 16:27:30 +1100

Hi all,

After merging the ftrace tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

In file included from arch/arm/include/asm/page.h:185,
                 from arch/arm/include/asm/thread_info.h:14,
                 from include/linux/thread_info.h:60,
                 from include/asm-generic/preempt.h:5,
                 from ./arch/arm/include/generated/asm/preempt.h:1,
                 from include/linux/preempt.h:79,
                 from include/linux/alloc_tag.h:11,
                 from include/linux/percpu.h:5,
                 from include/linux/context_tracking_state.h:5,
                 from include/linux/hardirq.h:5,
                 from include/linux/interrupt.h:11,
                 from include/linux/trace_recursion.h:5,
                 from kernel/trace/ring_buffer.c:7:
kernel/trace/ring_buffer.c: In function '__rb_map_vma':
kernel/trace/ring_buffer.c:7137:59: error: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
 7137 |                 if (virt_addr_valid(cpu_buffer->subbuf_ids[s]))
      |                                     ~~~~~~~~~~~~~~~~~~~~~~^~~
      |                                                           |
      |                                                           long unsigned int
arch/arm/include/asm/memory.h:386:66: note: in definition of macro 'virt_addr_valid'
  386 |                                         && pfn_valid(virt_to_pfn(kaddr)))
      |                                                                  ^~~~~
arch/arm/include/asm/memory.h:290:53: note: expected 'const void *' but argument is of type 'long unsigned int'
  290 | static inline unsigned long virt_to_pfn(const void *p)
      |                                         ~~~~~~~~~~~~^

Caused by commit

  10a299da2c2b ("ring-buffer: Allow persistent ring buffers to be mmapped")

I used the ftrace tree from next-20250307 for today.

-- 
Cheers,
Stephen Rothwell