[GIT PULL] MIPS fixes for 4.19-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Linus,

Here are a few MIPS fixes for 4.19 - please pull.

There are a couple of conflicts with master, currently at 815f0ddb346c
("include/linux/compiler*.h: make compiler-*.h mutually exclusive"), but
nothing complex:

  - arch/Kconfig should just keep the additions of both
    HAVE_ARCH_PREL32_RELOCATIONS & HAVE_ARCH_COMPILER_H.

  - include/linux/compiler_types.h should keep the #ifdef
    CONFIG_HAVE_ARCH_COMPILER_H & associated comment, placing it after
    the linux/compiler-*.h inclusions.

Here's a sample resolution:

diff --cc arch/Kconfig
index 4426e9687d89,5c7c48e7b727..af0283ad1534
--- a/arch/Kconfig
+++ b/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_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.
 +
+ 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.
+
  source "kernel/gcov/Kconfig"
 +
 +source "scripts/gcc-plugins/Kconfig"
 +
 +endmenu
diff --cc include/linux/compiler_types.h
index 90479a0f3986,4be464a07612..3525c179698c
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@@ -54,20 -54,44 +54,32 @@@ extern void __chk_io_ptr(const volatil
  
  #ifdef __KERNEL__
  
 -#ifdef __GNUC__
 -#include <linux/compiler-gcc.h>
 -#endif
 -
 -#if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__)
 -#define notrace __attribute__((hotpatch(0,0)))
 -#else
 -#define notrace __attribute__((no_instrument_function))
 -#endif
 -
 -/* Intel compiler defines __GNUC__. So we will overwrite implementations
 - * coming from above header files here
 - */
 -#ifdef __INTEL_COMPILER
 -# include <linux/compiler-intel.h>
 -#endif
 -
 -/* Clang compiler defines __GNUC__. So we will overwrite implementations
 - * coming from above header files here
 - */
 +/* Compiler specific macros. */
  #ifdef __clang__
  #include <linux/compiler-clang.h>
 +#elif defined(__INTEL_COMPILER)
 +#include <linux/compiler-intel.h>
 +#elif defined(__GNUC__)
 +/* The above compilers also define __GNUC__, so order is important here. */
 +#include <linux/compiler-gcc.h>
 +#else
 +#error "Unknown compiler"
  #endif
  
+ /*
+  * 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-dependent macros required for kernel
 + * Generic compiler-independent macros required for kernel
   * build go below this comment. Actual compiler/compiler version
   * specific implementations come from the above header files
   */

Thanks,
    Paul


The following changes since commit 22f20a110321efb7cde3e87ae99862e1036ca285:

  MIPS: Remove remnants of UASM_ISA (2018-08-09 14:45:00 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git tags/mips_4.19_2

for you to fetch changes up to 690d9163bf4b8563a2682e619f938e6a0443947f:

  MIPS: lib: Provide MIPS64r6 __multi3() for GCC < 7 (2018-08-21 12:14:11 -0700)

----------------------------------------------------------------
A few MIPS fixes for 4.19:

  - 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.

----------------------------------------------------------------
Paul Burton (6):
      MIPS: Export tlbmiss_handler_setup_pgd near its definition
      MIPS: Consistently declare TLB functions
      MIPS: Avoid move psuedo-instruction whilst using MIPS_ISA_LEVEL
      compiler.h: Allow arch-specific asm/compiler.h
      MIPS: Workaround GCC __builtin_unreachable reordering bug
      MIPS: lib: Provide MIPS64r6 __multi3() for GCC < 7

 arch/Kconfig                           |   8 +++
 arch/mips/Kconfig                      |   1 +
 arch/mips/include/asm/asm-prototypes.h |   1 +
 arch/mips/include/asm/atomic.h         |   4 +-
 arch/mips/include/asm/compiler.h       |  35 ++++++++++++
 arch/mips/include/asm/mmu_context.h    |   1 +
 arch/mips/include/asm/tlbex.h          |   9 +++
 arch/mips/kernel/traps.c               |   4 +-
 arch/mips/lib/multi3.c                 |   6 +-
 arch/mips/mm/tlb-funcs.S               |   3 +-
 arch/mips/mm/tlbex.c                   | 101 +++++++++++++--------------------
 include/linux/compiler_types.h         |  12 ++++
 12 files changed, 116 insertions(+), 69 deletions(-)

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux