1. 30 9月, 2016 3 次提交
    • P
      MIPS: clear execution hazard after changing FTLB enable · 67acd8d5
      Paul Burton 提交于
      On current P-series cores from Imagination the FTLB can be enabled or
      disabled via a bit in the Config6 register, and an execution hazard is
      created by changing the value of bit. The ftlb_disable function already
      cleared that hazard but that does no good for other callers. Clear the
      hazard in the set_ftlb_enable function that creates it, and only for the
      cores where it applies.
      
      This has the effect of reverting c982c6d6 ("MIPS: cpu-probe: Remove
      cp0 hazard barrier when enabling the FTLB") which was incorrect.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Fixes: c982c6d6 ("MIPS: cpu-probe: Remove cp0 hazard barrier when enabling the FTLB")
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14023/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      67acd8d5
    • P
      MIPS: Configure FTLB after probing TLB sizes from config4 · ebd0e0f5
      Paul Burton 提交于
      On some cores (proAptiv, P5600) we make use of the sizes of the TLBs
      to determine the desired FTLB:VTLB write ratio. However set_ftlb_enable
      & thus calculate_ftlb_probability is called before decode_config4. This
      results in us calculating a probability based on zero sizes, and we end
      up setting FTLBP=3 for a 3:1 FTLB:VTLB write ratio in all cases. This
      will make abysmal use of the available FTLB resources in the affected
      cores.
      
      Fix this by configuring the FTLB probability after having decoded
      config4. However we do need to have enabled the FTLB before that point
      such that fields in config4 actually reflect that an FTLB is present. So
      set_ftlb_enable is now called twice, with flags indicating that it
      should configure the write probability only the second time.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Fixes: cf0a8aa0 ("MIPS: cpu-probe: Set the FTLB probability bit on supported cores")
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14022/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      ebd0e0f5
    • P
      MIPS: Stop setting I6400 FTLBP · 72c70f01
      Paul Burton 提交于
      The FTLBP field in Config7 for the I6400 is intended as chicken bits for
      debugging rather than as a field that software actually makes use of.
      For best performance, FTLBP should be left at its default value of 0
      with all TLB writes hitting the FTLB by default.
      
      Additionally, since set_ftlb_enable is called from decode_configs before
      decode_config4 which determines the size of the TLBs, this was
      previously always setting FTLBP=3 for a 3:1 FTLB:VTLB write ratio which
      makes abysmal use of the available FTLB resources.
      
      This effectively reverts b0c4e1b79d8a ("MIPS: Set up FTLB probability
      for I6400").
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Fixes: b0c4e1b79d8a ("MIPS: Set up FTLB probability for I6400")
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14021/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      72c70f01
  2. 28 5月, 2016 1 次提交
  3. 13 5月, 2016 20 次提交
  4. 20 1月, 2016 4 次提交
    • M
      MIPS: Add IEEE Std 754 conformance mode selection · 503943e0
      Maciej W. Rozycki 提交于
      Add an `ieee754=' kernel parameter to control IEEE Std 754 conformance
      mode.
      
      Use separate flags copied from the respective CPU feature flags, and
      adjusted according to the conformance mode selected, to make binaries
      requesting individual NaN encoding modes accepted or rejected as needed.
      Update the initial setting for FCSR and, in the full FPU emulation mode,
      its read-only mask accordingly.  Accept the mode selection requested for
      legacy processors as well.
      
      As with the EF_MIPS_NAN2008 ELF file header flag adjust both ABS2008 and
      NAN2008 bits at the same time, to match the choice made for hardware
      currently implemented.
      Signed-off-by: NMaciej W. Rozycki <macro@imgtec.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11481/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      503943e0
    • M
      MIPS: Determine the presence of IEEE Std 754-2008 features · 93adeaf6
      Maciej W. Rozycki 提交于
      Determine the presence of and the amount of control available over IEEE
      Std 754-2008 features.
      
      In the case of a hardware FPU being used examine the FIR register for
      the presence of the HAS2008 bit and then the FCSR register for the
      writability of the ABS2008 and NAN2008 bits and the hardwired state of
      each of these bits if read-only.  Update the initial FCSR contents used
      for threads and the FCSR writability mask accordingly.
      
      For full FPU emulation and MIPS32 or MIPS64 processors make the FCSR
      ABS2008 and NAN2008 bits writable.
      Signed-off-by: NMaciej W. Rozycki <macro@imgtec.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11480/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      93adeaf6
    • M
      MIPS: math-emu: Add IEEE Std 754-2008 NaN encoding emulation · 90d53a91
      Maciej W. Rozycki 提交于
      Implement IEEE Std 754-2008 NaN encoding wired to the state of the
      FCSR.NAN2008 bit.  Make the interpretation of the quiet bit in NaN data
      as follows:
      
      * in the legacy mode originally defined by the MIPS architecture the
        value of 1 denotes an sNaN whereas the value of 0 denotes a qNaN,
      
      * in the 2008 mode introduced with revision 5 of the MIPS architecture
        the value of 0 denotes an sNaN whereas the value of 1 denotes a qNaN,
        following the definition of the preferred NaN encoding introduced with
        IEEE Std 754-2008.
      
      In the 2008 mode, following the requirement of the said standard, quiet
      an sNaN where needed by setting the quiet bit to 1 and leaving all the
      NaN payload bits unchanged.
      
      Update format conversion operations according to the rules set by IEEE
      Std 754-2008 and the MIPS architecture.  Specifically:
      
      * propagate NaN payload bits through conversions between floating-point
        formats such that as much information as possible is preserved and
        specifically a conversion from a narrower format to a wider format and
        then back to the original format does not change a qNaN payload in any
        way,
      
      * conversions from a floating-point to an integer format where the
        source is a NaN, infinity or a value that would convert to an integer
        outside the range of the result format produce, under the default
        exception handling, the respective values defined by the MIPS
        architecture.
      
      In full FPU emulation set the FIR.HAS2008 bit to 1, however do not make
      any further FCSR bits writable.
      Signed-off-by: NMaciej W. Rozycki <macro@imgtec.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11477/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      90d53a91
    • M
      MIPS: Define the legacy-NaN and 2008-NaN features · 9519ef37
      Maciej W. Rozycki 提交于
      Allocate CPU option bits and define macros for the legacy-NaN and
      2008-NaN IEEE Std 754 MIPS architecture features.  Unconditionally mark
      the legacy-NaN feature as present across hardware and emulated
      floating-point configurations.
      Signed-off-by: NMaciej W. Rozycki <macro@imgtec.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11475/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      9519ef37
  5. 11 11月, 2015 1 次提交
  6. 23 9月, 2015 2 次提交
  7. 03 9月, 2015 4 次提交
  8. 26 8月, 2015 5 次提交