Re: [PATCH] riscv: ftrace: sorttable: fix mcount sorting

From: Chen Pei

Date: Mon Jun 08 2026 - 21:30:33 EST


On Mon, 8 Jun 2026 22:18:27 +0200, martin@xxxxxxxxx wrote:

> The sorttable helper program does not take into account that the
> -fpatchable-function-entry compiler flag reserves an additional 8 bytes
> before each traceable function. (The size in bytes is the same for
> RV32/64 or compressed/uncompressed instructions).
>
> Define before_func = 8 to fix the mcount sorting for risc-v, share this
> setting with arm64.
>
> Fixes: de04fca5d2f8 ("riscv: ftrace: select HAVE_BUILDTIME_MCOUNT_SORT")

Hi Martin,

Thanks for the patch.

This has already been addressed by Wang Han here:
https://lore.kernel.org/linux-riscv/20260527123530.2593918-2-wanghan@xxxxxxxxxxxxxxxxx/

Thanks,
Pei