OSDN Git Service

Merge tag 'mips_4.19_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 23 Aug 2018 21:23:08 +0000 (14:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 23 Aug 2018 21:23:08 +0000 (14:23 -0700)
Pull MIPS fixes from Paul Burton:

  - Fix microMIPS build failures by adding a .insn directive to the
    barrier_before_unreachable() asm statement in order to convince the
    toolchain that the asm statement is a valid branch target rather
    than a bogus attempt to switch ISA.

  - Clean up our declarations of TLB functions that we overwrite with
    generated code in order to prevent the compiler making assumptions
    about alignment that cause microMIPS kernels built with GCC 7 &
    above to die early during boot.

  - Fix up a regression for MIPS32 kernels which slipped into the main
    MIPS pull for 4.19, causing CONFIG_32BIT=y kernels to contain
    inappropriate MIPS64 instructions.

  - Extend our existing workaround for MIPSr6 builds that end up using
    the __multi3 intrinsic to GCC 7 & below, rather than just GCC 7.

* tag 'mips_4.19_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  MIPS: lib: Provide MIPS64r6 __multi3() for GCC < 7
  MIPS: Workaround GCC __builtin_unreachable reordering bug
  compiler.h: Allow arch-specific asm/compiler.h
  MIPS: Avoid move psuedo-instruction whilst using MIPS_ISA_LEVEL
  MIPS: Consistently declare TLB functions
  MIPS: Export tlbmiss_handler_setup_pgd near its definition

1  2 
arch/Kconfig
arch/mips/Kconfig
arch/mips/include/asm/atomic.h
arch/mips/kernel/traps.c
include/linux/compiler_types.h

diff --cc arch/Kconfig
@@@ -841,18 -971,12 +841,26 @@@ config REFCOUNT_FUL
          against various use-after-free conditions that can be used in
          security flaw exploits.
  
+ config HAVE_ARCH_COMPILER_H
+       bool
+       help
+         An architecture can select this if it provides an
+         asm/compiler.h header that should be included after
+         linux/compiler-*.h in order to override macro definitions that those
+         headers generally provide.
 +config HAVE_ARCH_PREL32_RELOCATIONS
 +      bool
 +      help
 +        May be selected by an architecture if it supports place-relative
 +        32-bit relocations, both in the toolchain and in the module loader,
 +        in which case relative references can be used in special sections
 +        for PCI fixup, initcalls etc which are only half the size on 64 bit
 +        architectures, and don't require runtime relocation on relocatable
 +        kernels.
 +
  source "kernel/gcov/Kconfig"
 +
 +source "scripts/gcc-plugins/Kconfig"
 +
 +endmenu
Simple merge
Simple merge
Simple merge
@@@ -67,7 -79,19 +67,19 @@@ extern void __chk_io_ptr(const volatil
  #endif
  
  /*
 - * Generic compiler-dependent macros required for kernel
+  * Some architectures need to provide custom definitions of macros provided
+  * by linux/compiler-*.h, and can do so using asm/compiler.h. We include that
+  * conditionally rather than using an asm-generic wrapper in order to avoid
+  * build failures if any C compilation, which will include this file via an
+  * -include argument in c_flags, occurs prior to the asm-generic wrappers being
+  * generated.
+  */
+ #ifdef CONFIG_HAVE_ARCH_COMPILER_H
+ #include <asm/compiler.h>
+ #endif
+ /*
 + * Generic compiler-independent macros required for kernel
   * build go below this comment. Actual compiler/compiler version
   * specific implementations come from the above header files
   */