1. 14 2月, 2017 1 次提交
    • J
      MIPS: Disable stack checks on MIPS kernels · 573deec0
      Joshua Kinard 提交于
      Disable stack checking on MIPS kernels.  Some distribution toolchains
      might pass the -fstack-check option to gcc.  This results in a
      store-doubleword instruction being emitted at the top of all
      functions that checks the available stack space.  E.g.,
      
        a80000000001d740 <per_cpu_init>:
        a80000000001d740:       ffa0bfc0        sd      zero,-16448(sp)
        a80000000001d744:       2405ffc9        li      a1,-55
        a80000000001d748:       67bdffc0        daddiu  sp,sp,-64
      
      Generally, this is undesirable, and especially on the SGI IP27
      platform, it will trigger a NULL pointer dereference in
      '_raw_spin_lock_irq' during early init.
      Signed-off-by: NJoshua Kinard <kumba@gentoo.org>
      Suggested-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/15132/Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      573deec0
  2. 25 1月, 2017 1 次提交
    • A
      MIPS: 'make -s' should be silent · 8c9b23ff
      Arnd Bergmann 提交于
      A clean mips64 build produces no output except for two lines:
      
        Checking missing-syscalls for N32
        Checking missing-syscalls for O32
      
      On other architectures, there is no output at all, so let's do the
      same here for the sake of build testing. The 'kecho' macro is used
      to print the message on a normal build but skip it with 'make -s'.
      
      Fixes: e48ce6b8 ("[MIPS] Simplify missing-syscalls for N32 and O32")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Matt Redfearn <matt.redfearn@imgtec.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Maarten ter Huurne <maarten@treewalker.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15040/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      8c9b23ff
  3. 03 1月, 2017 2 次提交
  4. 04 11月, 2016 1 次提交
  5. 07 10月, 2016 3 次提交
    • P
      MIPS: generic: Convert SEAD-3 to a generic board · 3f5f0a44
      Paul Burton 提交于
      Convert the MIPS SEAD-3 board support to be a generic board, supported
      by generic kernels.
      
      Because the SEAD-3 boot protocol was defined long ago and we don't want
      to force a switch to the UHI protocol, SEAD-3 is added as a legacy board
      which is detected by reading the REVISION register. This may technically
      not be a valid memory read & future work will include attempting to
      handle that gracefully. In practice since SEAD-3 is the only legacy
      board supported by the generic kernel so far the read will only happen
      on SEAD-3 boards, and even once Malta is converted the same REVISION
      register exists there too. Other boards such as Boston, Ci20 & Ci40 will
      use the UHI boot protocol & thus not run any of the legacy board detect
      functions.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14354/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      3f5f0a44
    • P
      MIPS: generic: Introduce generic DT-based board support · eed0eabd
      Paul Burton 提交于
      Introduce a "generic" platform, which aims to be board-agnostic by
      making use of device trees passed by the boot protocol defined in the
      MIPS UHI (Universal Hosting Interface) specification. Provision is made
      for supporting boards which use a legacy boot protocol that can't be
      changed, but adding support for such boards or any others is left to
      followon patches.
      
      Right now the built kernels expect to be loaded to 0x80100000, ie. in
      kseg0. This is fine for the vast majority of MIPS platforms, but
      nevertheless it would be good to remove this limitation in the future by
      mapping the kernel via the TLB such that it can be loaded anywhere & map
      itself appropriately.
      
      Configuration is handled by dynamically generating configs using
      scripts/kconfig/merge_config.sh, somewhat similar to the way powerpc
      makes use of it. This allows for variations upon the configuration, eg.
      differing architecture revisions or subsets of driver support for
      differing boards, to be handled without having a large number of
      defconfig files.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14353/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      eed0eabd
    • P
      MIPS: Support generating Flattened Image Trees (.itb) · cf2a5e0b
      Paul Burton 提交于
      Add support for generating kernel images in the Flattened Image Tree
      (.itb) format as supported by U-Boot. This format is essentially a
      Flattened Device Tree binary containing images (kernels, DTBs, ramdisks)
      and configurations which link those images together. The big advantages
      of FIT images over the uImage format are:
      
        - We can include FDTs in the kernel image in a way that the bootloader
          can extract it & manipulate it before providing it to the kernel.
          Thus we can ship FDTs as part of the kernel giving us the advantages
          of being able to develop & maintain the DT within the kernel tree,
          but also have the benefits of the bootloader being able to
          manipulate the FDT. Example uses for this would be to inject the
          kernel command line into the chosen node, or to fill in the correct
          memory size.
      
        - We can include multiple configurations in a single kernel image.
          This means that a single FIT image can, given appropriate
          bootloaders, be booted on different boards with the bootloader
          selecting an appropriate configuration & providing the correct FDT
          to the kernel.
      
        - We can support a multitude of hashes over the data.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14352/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      cf2a5e0b
  6. 13 9月, 2016 1 次提交
    • P
      MIPS: Remove compact branch policy Kconfig entries · b03c1e3b
      Paul Burton 提交于
      Commit c1a0e9bc ("MIPS: Allow compact branch policy to be changed")
      added Kconfig entries allowing for the compact branch policy used by the
      compiler for MIPSr6 kernels to be specified. This can be useful for
      debugging, particularly in systems where compact branches have recently
      been introduced.
      
      Unfortunately mainline gcc 5.x supports MIPSr6 but not the
      -mcompact-branches compiler flag, leading to MIPSr6 kernels failing to
      build with gcc 5.x with errors such as:
      
        mipsel-linux-gnu-gcc: error: unrecognized command line option '-mcompact-branches=optimal'
        make[2]: *** [kernel/bounds.s] Error 1
      
      Fixing this by hiding the Kconfig entry behind another seems to be more
      hassle than it's worth, as MIPSr6 & compact branches have been around
      for a while now and if policy does need to be set for debug it can be
      done easily enough with KCFLAGS. Therefore remove the compact branch
      policy Kconfig entries & their handling in the Makefile.
      
      This reverts commit c1a0e9bc ("MIPS: Allow compact branch policy to
      be changed").
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Fixes: c1a0e9bc ("MIPS: Allow compact branch policy to be changed")
      Cc: stable <stable@vger.kernel.org> # v4.4+
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14241/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      b03c1e3b
  7. 17 5月, 2016 1 次提交
    • J
      MIPS: Fix VZ probe gas errors with binutils <2.24 · bad50d79
      James Hogan 提交于
      The VZ guest register & TLB access macros introduced in commit "MIPS:
      Add guest CP0 accessors" use VZ ASE specific instructions that aren't
      understood by versions of binutils prior to 2.24.
      
      Add a check for whether the toolchain supports the -mvirt option,
      similar to the MSA toolchain check, and implement the accessors using
      .word if not.
      
      Due to difficulty in converting compiler specified registers (e.g. "$3")
      to usable numbers (e.g. "3") in inline asm, we need to copy to/from a
      temporary register, namely the assembler temporary (at/$1), and specify
      guest CP0 registers numerically in the gc0 macros.
      
      Fixes: 7eb91118 ("MIPS: Add guest CP0 accessors")
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-next@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/13255/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      bad50d79
  8. 13 5月, 2016 2 次提交
  9. 22 1月, 2016 1 次提交
  10. 26 10月, 2015 1 次提交
  11. 15 7月, 2015 1 次提交
    • R
      MIPS: SB1: Remove support for Pass 1 parts. · dd0bc75e
      Ralf Baechle 提交于
      Pass 1 parts had a number of significant erratas and were only available
      in small numbers and under NDA.  Full support also required the use of a
      special toolchain that kept branches properly aligned.  These workarounds
      were never upstreamed and the only toolchain known to have them is
      Montavista's GCC 3.0-based toolchain which completly obsoleted if not
      useless these days.
      
      So now that automated testing has tripped over the user of the
      -msb1-pass1-workarounds option, rather than fixing it remove support for
      pass 1 parts.
      
      Probably nobody will notice.  I seem to own the last know pass 1 board
      and I haven't noticed another one in the wild in the past decade, at
      least.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      dd0bc75e
  12. 13 5月, 2015 1 次提交
  13. 10 4月, 2015 1 次提交
    • M
      MIPS: Makefile: Fix MIPS ASE detection code · 5306a545
      Markos Chandras 提交于
      Commit 32098ec7 ("MIPS: Makefile: Move the ASEs checks after
      setting the core's CFLAGS") re-arranged the MIPS ASE detection code
      and also added the current cflags to the detection logic. However,
      this introduced a few bugs. First of all, the mips-cflags should not
      be quoted since that ends up being passed as a string to subsequent
      commands leading to broken detection from the cc-option-* tools.
      Moreover, in order to avoid duplicating the cflags-y because of how
      cc-option works, we rework the logic so we pass only those cflags which
      are needed by the selected ASE. Finally, fix some typos resulting in MSA
      not being detected correctly.
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Fixes: Commit 32098ec7 ("MIPS: Makefile: Move the ASEs checks after setting the core's CFLAGS")
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/9661/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5306a545
  14. 02 4月, 2015 1 次提交
  15. 01 4月, 2015 2 次提交
  16. 20 2月, 2015 1 次提交
  17. 19 2月, 2015 2 次提交
  18. 16 2月, 2015 2 次提交
  19. 24 11月, 2014 1 次提交
  20. 07 11月, 2014 1 次提交
    • M
      MIPS: Fix build with binutils 2.24.51+ · 842dfc11
      Manuel Lauss 提交于
      Starting with version 2.24.51.20140728 MIPS binutils complain loudly
      about mixing soft-float and hard-float object files, leading to this
      build failure since GCC is invoked with "-msoft-float" on MIPS:
      
      {standard input}: Warning: .gnu_attribute 4,3 requires `softfloat'
        LD      arch/mips/alchemy/common/built-in.o
      mipsel-softfloat-linux-gnu-ld: Warning: arch/mips/alchemy/common/built-in.o
       uses -msoft-float (set by arch/mips/alchemy/common/prom.o),
       arch/mips/alchemy/common/sleeper.o uses -mhard-float
      
      To fix this, we detect if GAS is new enough to support "-msoft-float" command
      option, and if it does, we can let GCC pass it to GAS;  but then we also need
      to sprinkle the files which make use of floating point registers with the
      necessary ".set hardfloat" directives.
      Signed-off-by: NManuel Lauss <manuel.lauss@gmail.com>
      Cc: Linux-MIPS <linux-mips@linux-mips.org>
      Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
      Cc: Markos Chandras <Markos.Chandras@imgtec.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Patchwork: https://patchwork.linux-mips.org/patch/8355/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      842dfc11
  21. 22 9月, 2014 2 次提交
    • A
      MIPS: Add support for building device-tree binaries · c8d333df
      Andrew Bresticker 提交于
      Add a 'dtbs' Makefile target that just builds the device-tree binaries
      enabled by the configuration.
      Signed-off-by: NAndrew Bresticker <abrestic@chromium.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
      Cc: Kumar Gala <galak@codeaurora.org>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: David Daney <david.daney@cavium.com>
      Cc: John Crispin <blogic@openwrt.org>
      Cc: Jayachandran C <jchandra@broadcom.com>
      Cc: Qais Yousef <qais.yousef@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/7557/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c8d333df
    • A
      MIPS: Create common infrastructure for building built-in device-trees · 7fafb068
      Andrew Bresticker 提交于
      In preparation for moving the device-trees to a common location,
      introduce the config option BUILTIN_DTB, which can be selected by
      platforms that use a device-tree built into the kernel image, and
      create a Makefile to build the device-trees in arch/mips/boot/dts/.
      Signed-off-by: NAndrew Bresticker <abrestic@chromium.org>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
      Cc: Kumar Gala <galak@codeaurora.org>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: David Daney <david.daney@cavium.com>
      Cc: John Crispin <blogic@openwrt.org>
      Cc: Jayachandran C <jchandra@broadcom.com>
      Cc: Qais Yousef <qais.yousef@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: devicetree@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/7564/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      7fafb068
  22. 17 9月, 2014 1 次提交
    • M
      MIPS: SmartMIPS: Disable assembler warnings · dab1b445
      Markos Chandras 提交于
      The kernel code overrides the default ISA as passed by the compiler
      in quite a few places. This has unfortunate side effects when smartmips
      is enabled leading to hundreds of warnings during build such as:
      
      {standard input}: Assembler messages:
      {standard input}:411: Warning: the `smartmips' extension requires MIPS32
      revision 1 or greater
      {standard input}: Assembler messages:
      {standard input}:43: Warning: the 64-bit MIPS architecture does not support the
      `smartmips' extension
      [...]
      
      Until the kernel code is fixed properly (if possible), disable all the
      assembler warning messages to make the build logs readable again.
      This has no runtime side effects but it makes it easier to spot
      more critical warnings and problems during build.
      Signed-off-by: NMarkos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/7356/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      dab1b445
  23. 30 7月, 2014 1 次提交
    • M
      MIPS: SB1: Check optional compilation flags one by one · b625cd4a
      Maciej W. Rozycki 提交于
      This fixes a regression caused by commit
      bb6c0bd3 [MIPS: SB1: Fix excessive kernel
      warnings.], that makes `-march=r5000' selected for compilation flags
      rather than supposed `-march=sb1' with compilers that do not support the
      ASE selection flags introduced with that change.
      
      For example GCC 4.1.2 supports `-mips3d'/`-mno-mips3d' (and obviously
      `-march=sb1'), however it does not support `-mdmx'/`-mno-mdmx'.  As a
      result the whole selection of flags fails and compilation resorts to using
      `-march=r5000', meant for really old compilers indeed only.
      
      It is always best to pick the flags individually unless we are absolutely
      sure a set of flags was introduced to the toolchain together (`-march=sb1'
      and `-mtune=sb1' would be a good example), and this change makes it happen
      for CONFIG_CPU_SB1.  Consequently the flags ultimately selected with GCC
      4.1.2 are `-march=sb1 -Wa,--trap -mno-mips3d'
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Cc: Richard Sandiford <rdsandiford@googlemail.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/7223/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      b625cd4a
  24. 04 6月, 2014 1 次提交
  25. 28 5月, 2014 1 次提交
    • R
      MIPS: SB1: Fix excessive kernel warnings. · bb6c0bd3
      Ralf Baechle 提交于
      A kernel build with binutils 2.24 is going to emit warnings like
      
        CC      kernel/sys.o
      {standard input}: Assembler messages:
      {standard input}:701: Warning: the 32-bit MIPS architecture does not support the `mdmx' extension
      {standard input}:701: Warning: the `mdmx' extension requires 64-bit FPRs
      {standard input}:701: Warning: the `mips3d' extension requires MIPS32 revision 2 or greater
      {standard input}:701: Warning: the `mips3d' extension requires 64-bit FPRs
      
      for almost every file.  This is caused by changes to gas' interpretation
      of .set semantics.  Fixed by explicitly disabling MIPS3D and MDMX for
      Sibyte builds.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      bb6c0bd3
  26. 23 5月, 2014 1 次提交
    • R
      MIPS: math-emu: Move various objects into an ar library. · 593d33fe
      Ralf Baechle 提交于
      ieee754d.o contains only debug code and dp_sqrt.o and sp_sqrt.o contain
      code which for MIPS I/II/III systems we don't want to link.  Again the
      savings can be considerable for some systems:
      
      $ mips-linux-size --totals ieee754d.o dp_sqrt.o sp_sqrt.o
         text	   data	    bss	    dec	    hex	filename
         1624	      0	      0	   1624	    658	ieee754d.o
         2016	      0	      0	   2016	    7e0	dp_sqrt.o
          736	      0	      0	    736	    2e0	sp_sqrt.o
         4376	      0	      0	   4376	   1118	(TOTALS)
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      593d33fe
  27. 27 3月, 2014 1 次提交
  28. 23 1月, 2014 1 次提交
  29. 20 12月, 2013 1 次提交
    • K
      stackprotector: Unify the HAVE_CC_STACKPROTECTOR logic between architectures · 19952a92
      Kees Cook 提交于
      Instead of duplicating the CC_STACKPROTECTOR Kconfig and
      Makefile logic in each architecture, switch to using
      HAVE_CC_STACKPROTECTOR and keep everything in one place. This
      retains the x86-specific bug verification scripts.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-mips@linux-mips.org
      Cc: linux-arch@vger.kernel.org
      Link: http://lkml.kernel.org/r/1387481759-14535-2-git-send-email-keescook@chromium.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      19952a92
  30. 30 10月, 2013 2 次提交
  31. 19 9月, 2013 1 次提交