1. 03 9月, 2015 1 次提交
    • C
      MIPS: Use unsigned int when reading CP0 registers · 82eb8f73
      Chris Packham 提交于
      Update __read_32bit_c0_register() and __read_32bit_c0_ctrl_register() to
      use "unsigned int res;" instead of "int res;". There is little reason to
      treat these register values as signed. They are either counters (which
      by definition are unsigned) or are made up of various bit fields to be
      interpreted as per the CPU datasheet.
      
      This has come up via u-boot[1] which sync's asm/mipsregs.h with the
      kernel. In u-boots case the value read from read_c0_count() is assigned
      to an unsigned long [2] which triggers a sign extension and causes a
      bug.
      
      U-boot should probably be more explicit about the types used for the
      timer_read_counter() API but that aside is there any reason to treat
      these values as signed integers? A quick grep around the arch/mips makes
      me thing that there may be some bugs lurking when read_c0_count() starts
      to yield a negative value but I haven't really explored any of them.
      
      [1] - http://lists.denx.de/pipermail/u-boot/2015-July/219086.html
      [2] - http://git.denx.de/?p=u-boot.git;a=blob;f=arch/mips/cpu/time.c#l11Signed-off-by: NChris Packham <judge.packham@gmail.com>
      Cc: linux-mips@linux-mips.org
      Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
      Cc: Chris Packham <judge.packham@gmail.com>
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/10718/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      82eb8f73
  2. 26 8月, 2015 1 次提交
  3. 22 6月, 2015 2 次提交
    • J
      MIPS: R12000: Enable branch prediction global history · 8d5ded16
      Joshua Kinard 提交于
      The R12000 added a new feature to enhance branch prediction called
      "global history".  Per the Vr10000 Series User Manual (U10278EJ4V0UM),
      Coprocessor 0, Diagnostic Register (22):
      
      """
      If bit 26 is set, branch prediction uses all eight bits of the global
      history register.  If bit 26 is not set, then bits 25:23 specify a count
      of the number of bits of global history to be used. Thus if bits 26:23
      are all zero, global history is disabled.
      
      The global history contains a record of the taken/not-taken status of
      recently executed branches, and when used is XOR'ed with the PC of a
      branch being predicted to produce a hashed value for indexing the BPT.
      Some programs with small "working set of conditional branches" benefit
      significantly from the use of such hashing, some see slight performance
      degradation.
      """
      
      This patch enables global history on R12000 CPUs and up by setting bit
      26 in the branch prediction diagnostic register (CP0 $22) to '1'.  Bits
      25:23 are left alone so that all eight bits of the global history
      register are available for branch prediction.
      Signed-off-by: NJoshua Kinard <kumba@gentoo.org>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      8d5ded16
    • J
      MIPS: mipsregs.h: Add EntryLo bit definitions · 8ab6abcb
      James Hogan 提交于
      Add definitions for EntryLo register bits in mipsregs.h. The R4000
      compatible ones are prefixed MIPS_ENTRYLO_ and the R3000 compatible ones
      are prefixed R3K_ENTRYLO_.
      
      These will be used in later patches.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Patchwork: https://patchwork.linux-mips.org/patch/10073/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      8ab6abcb
  4. 08 4月, 2015 6 次提交
  5. 31 3月, 2015 2 次提交
  6. 20 2月, 2015 1 次提交
  7. 17 2月, 2015 2 次提交
  8. 31 1月, 2015 1 次提交
    • J
      MIPS: mipsregs.h: Add write_32bit_cp1_register() · 5e32033e
      James Hogan 提交于
      Add a write_32bit_cp1_register() macro to compliment the
      read_32bit_cp1_register() macro. This is to abstract whether .set
      hardfloat needs to be used based on GAS_HAS_SET_HARDFLOAT.
      
      The implementation of _read_32bit_cp1_register() .sets mips1 due to
      failure of gas v2.19 to assemble cfc1 for Octeon (see commit
      25c30003 ("MIPS: Override assembler target architecture for
      octeon.")). I haven't copied this over to _write_32bit_cp1_register() as
      I'm uncertain whether it applies to ctc1 too, or whether anybody cares
      about that version of binutils any longer.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: David Daney <david.daney@cavium.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/9172/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5e32033e
  9. 25 11月, 2014 1 次提交
  10. 24 11月, 2014 2 次提交
  11. 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
  12. 02 8月, 2014 4 次提交
  13. 31 5月, 2014 1 次提交
  14. 24 5月, 2014 1 次提交
    • R
      MIPS: MT: Remove SMTC support · b633648c
      Ralf Baechle 提交于
      Nobody is maintaining SMTC anymore and there also seems to be no userbase.
      Which is a pity - the SMTC technology primarily developed by Kevin D.
      Kissell <kevink@paralogos.com> is an ingenious demonstration for the MT
      ASE's power and elegance.
      
      Based on Markos Chandras <Markos.Chandras@imgtec.com> patch
      https://patchwork.linux-mips.org/patch/6719/ which while very similar did
      no longer apply cleanly when I tried to merge it plus some additional
      post-SMTC cleanup - SMTC was a feature as tricky to remove as it was to
      merge once upon a time.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      b633648c
  15. 23 5月, 2014 1 次提交
  16. 27 3月, 2014 1 次提交
  17. 07 3月, 2014 3 次提交
  18. 23 1月, 2014 5 次提交
  19. 19 9月, 2013 1 次提交
  20. 01 7月, 2013 1 次提交
  21. 09 5月, 2013 1 次提交
  22. 02 5月, 2013 1 次提交