From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Fri, 22 Mar 2024 17:22:45 +0000 (-0700)
Subject: Merge tag 'loongarch-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai... 
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1e3cd03c54b76b4cbc8b31256dc3f18c417a6876;p=users%2Fjedix%2Flinux-maple.git

Merge tag 'loongarch-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson

Pull LoongArch updates from Huacai Chen:

 - Add objtool support for LoongArch

 - Add ORC stack unwinder support for LoongArch

 - Add kernel livepatching support for LoongArch

 - Select ARCH_HAS_CURRENT_STACK_POINTER in Kconfig

 - Select HAVE_ARCH_USERFAULTFD_MINOR in Kconfig

 - Some bug fixes and other small changes

* tag 'loongarch-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
  LoongArch/crypto: Clean up useless assignment operations
  LoongArch: Define the __io_aw() hook as mmiowb()
  LoongArch: Remove superfluous flush_dcache_page() definition
  LoongArch: Move {dmw,tlb}_virt_to_page() definition to page.h
  LoongArch: Change __my_cpu_offset definition to avoid mis-optimization
  LoongArch: Select HAVE_ARCH_USERFAULTFD_MINOR in Kconfig
  LoongArch: Select ARCH_HAS_CURRENT_STACK_POINTER in Kconfig
  LoongArch: Add kernel livepatching support
  LoongArch: Add ORC stack unwinder support
  objtool: Check local label in read_unwind_hints()
  objtool: Check local label in add_dead_ends()
  objtool/LoongArch: Enable orc to be built
  objtool/x86: Separate arch-specific and generic parts
  objtool/LoongArch: Implement instruction decoder
  objtool/LoongArch: Enable objtool to be built
---

1e3cd03c54b76b4cbc8b31256dc3f18c417a6876
diff --cc arch/loongarch/Kconfig
index c139d0d72802,526a88598fbf..a5f300ec6f28
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@@ -133,8 -135,11 +135,10 @@@ config LOONGARC
  	select HAVE_KPROBES
  	select HAVE_KPROBES_ON_FTRACE
  	select HAVE_KRETPROBES
 -	select HAVE_KVM
+ 	select HAVE_LIVEPATCH
  	select HAVE_MOD_ARCH_SPECIFIC
  	select HAVE_NMI
+ 	select HAVE_OBJTOOL if AS_HAS_EXPLICIT_RELOCS
  	select HAVE_PCI
  	select HAVE_PERF_EVENTS
  	select HAVE_PERF_REGS
diff --cc arch/loongarch/Makefile
index fa4fb09909ae,e3bc02fb7fdc..df6caf79537a
--- a/arch/loongarch/Makefile
+++ b/arch/loongarch/Makefile
@@@ -82,7 -92,15 +92,16 @@@ KBUILD_AFLAGS_MODULE		+= -Wa,-mla-globa
  KBUILD_CFLAGS_MODULE		+= -fplt -Wa,-mla-global-with-abs,-mla-local-with-abs
  endif
  
+ KBUILD_AFLAGS			+= $(call cc-option,-mno-relax) $(call cc-option,-Wa$(comma)-mno-relax)
+ KBUILD_CFLAGS			+= $(call cc-option,-mno-relax) $(call cc-option,-Wa$(comma)-mno-relax)
+ KBUILD_AFLAGS			+= $(call cc-option,-mthin-add-sub) $(call cc-option,-Wa$(comma)-mthin-add-sub)
+ KBUILD_CFLAGS			+= $(call cc-option,-mthin-add-sub) $(call cc-option,-Wa$(comma)-mthin-add-sub)
+ 
+ ifdef CONFIG_OBJTOOL
+ KBUILD_CFLAGS			+= -fno-jump-tables
+ endif
+ 
 +KBUILD_RUSTFLAGS			+= --target=$(objtree)/scripts/target.json
  KBUILD_RUSTFLAGS_MODULE		+= -Crelocation-model=pic
  
  ifeq ($(CONFIG_RELOCATABLE),y)