This is a note to let you know that I've just added the patch titled riscv: Select HAVE_DYNAMIC_FTRACE when -fpatchable-function-entry is available to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: riscv-select-have_dynamic_ftrace-when-fpatchable-function-entry-is-available.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From adebc8817b5c975d598ac379bbdf67a7a5186ade Mon Sep 17 00:00:00 2001 From: Nathan Chancellor <nathan@xxxxxxxxxx> Date: Thu, 25 Mar 2021 15:38:07 -0700 Subject: riscv: Select HAVE_DYNAMIC_FTRACE when -fpatchable-function-entry is available From: Nathan Chancellor <nathan@xxxxxxxxxx> commit adebc8817b5c975d598ac379bbdf67a7a5186ade upstream. clang prior to 13.0.0 does not support -fpatchable-function-entry for RISC-V. clang: error: unsupported option '-fpatchable-function-entry=8' for target 'riscv64-unknown-linux-gnu' To avoid this error, only select HAVE_DYNAMIC_FTRACE when this option is not available. Fixes: afc76b8b8011 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT") Link: https://github.com/ClangBuiltLinux/linux/issues/1268 Reported-by: kernel test robot <lkp@xxxxxxxxx> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx> Reviewed-by: Fangrui Song <maskray@xxxxxxxxxx> Signed-off-by: Palmer Dabbelt <palmerdabbelt@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -224,7 +224,7 @@ config ARCH_RV64I bool "RV64I" select 64BIT select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && GCC_VERSION >= 50000 - select HAVE_DYNAMIC_FTRACE if MMU + select HAVE_DYNAMIC_FTRACE if MMU && $(cc-option,-fpatchable-function-entry=8) select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FUNCTION_GRAPH_TRACER Patches currently in stable-queue which might be from nathan@xxxxxxxxxx are queue-5.10/riscv-select-have_dynamic_ftrace-when-fpatchable-function-entry-is-available.patch queue-5.10/s390-define-runtime_discard_exit-to-fix-link-error-with-gnu-ld-2.36.patch queue-5.10/macintosh-windfarm-use-unsigned-type-for-1-bit-bitfi.patch queue-5.10/sh-define-runtime_discard_exit.patch