Merge tag 'mips_6.5_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 9 Jul 2023 17:02:49 +0000 (10:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 9 Jul 2023 17:02:49 +0000 (10:02 -0700)
Pull MIPS fixes from Thomas Bogendoerfer:

 - fixes for KVM

 - fix for loongson build and cpu probing

 - DT fixes

* tag 'mips_6.5_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  MIPS: kvm: Fix build error with KVM_MIPS_DEBUG_COP0_COUNTERS enabled
  MIPS: dts: add missing space before {
  MIPS: Loongson: Fix build error when make modules_install
  MIPS: KVM: Fix NULL pointer dereference
  MIPS: Loongson: Fix cpu_probe_loongson() again

1  2 
arch/mips/Makefile

diff --combined arch/mips/Makefile
@@@ -181,16 -181,12 +181,12 @@@ endi
  cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1
  cflags-$(CONFIG_CPU_BMIPS)    += -march=mips32 -Wa,-mips32 -Wa,--trap
  
- cflags-$(CONFIG_CPU_LOONGSON2E) += -march=loongson2e -Wa,--trap
- cflags-$(CONFIG_CPU_LOONGSON2F) += -march=loongson2f -Wa,--trap
+ cflags-$(CONFIG_CPU_LOONGSON2E) += $(call cc-option,-march=loongson2e) -Wa,--trap
+ cflags-$(CONFIG_CPU_LOONGSON2F) += $(call cc-option,-march=loongson2f) -Wa,--trap
+ cflags-$(CONFIG_CPU_LOONGSON64) += $(call cc-option,-march=loongson3a,-march=mips64r2) -Wa,--trap
  # Some -march= flags enable MMI instructions, and GCC complains about that
  # support being enabled alongside -msoft-float. Thus explicitly disable MMI.
  cflags-$(CONFIG_CPU_LOONGSON2EF) += $(call cc-option,-mno-loongson-mmi)
- ifdef CONFIG_CPU_LOONGSON64
- cflags-$(CONFIG_CPU_LOONGSON64)       += -Wa,--trap
- cflags-$(CONFIG_CC_IS_GCC) += -march=loongson3a
- cflags-$(CONFIG_CC_IS_CLANG) += -march=mips64r2
- endif
  cflags-$(CONFIG_CPU_LOONGSON64) += $(call cc-option,-mno-loongson-mmi)
  
  cflags-$(CONFIG_CPU_R4000_WORKAROUNDS)        += $(call cc-option,-mfix-r4000,)
@@@ -346,7 -342,7 +342,7 @@@ KBUILD_CFLAGS += -fno-asynchronous-unwi
  KBUILD_LDFLAGS                += -m $(ld-emul)
  
  ifdef CONFIG_MIPS
 -CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
 +CHECKFLAGS += $(shell $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
        grep -E -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
        sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
  endif