]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Mar 2023 10:44:11 +0000 (11:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Mar 2023 10:44:11 +0000 (11:44 +0100)
added patches:
riscv-select-have_dynamic_ftrace-when-fpatchable-function-entry-is-available.patch

queue-5.10/riscv-select-have_dynamic_ftrace-when-fpatchable-function-entry-is-available.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/riscv-select-have_dynamic_ftrace-when-fpatchable-function-entry-is-available.patch b/queue-5.10/riscv-select-have_dynamic_ftrace-when-fpatchable-function-entry-is-available.patch
new file mode 100644 (file)
index 0000000..fcbfd4a
--- /dev/null
@@ -0,0 +1,39 @@
+From adebc8817b5c975d598ac379bbdf67a7a5186ade Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <nathan@kernel.org>
+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@kernel.org>
+
+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@intel.com>
+Signed-off-by: Nathan Chancellor <nathan@kernel.org>
+Reviewed-by: Fangrui Song <maskray@google.com>
+Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
index 89d3aeb35091a8cc1cba3ae15b4dbeff8ee08ccb..1f79337b6bc6071774b5aabb5bac1f4b85f77e69 100644 (file)
@@ -17,7 +17,6 @@ irqdomain-refactor-__irq_domain_alloc_irqs.patch
 irqdomain-fix-mapping-creation-race.patch
 irqdomain-change-the-type-of-size-in-__irq_domain_ad.patch
 irqdomain-fix-domain-registration-race.patch
-software-node-introduce-device_add_software_node.patch
 usb-dwc3-pci-register-a-software-node-for-the-dwc3-p.patch
 usb-dwc3-pci-id-for-tiger-lake-cpu.patch
 usb-dwc3-pci-add-support-for-the-intel-raptor-lake-s.patch
@@ -107,3 +106,4 @@ powerpc-vmlinux.lds-don-t-discard-.rela-for-relocatable-builds.patch
 s390-define-runtime_discard_exit-to-fix-link-error-with-gnu-ld-2.36.patch
 sh-define-runtime_discard_exit.patch
 uml-define-runtime_discard_exit.patch
+riscv-select-have_dynamic_ftrace-when-fpatchable-function-entry-is-available.patch