1. 13 5月, 2016 2 次提交
  2. 18 8月, 2015 1 次提交
    • R
      MIPS: Fix LLVM build issue. · 158d3b2a
      Ralf Baechle 提交于
      Matthew Fortune <Matthew.Fortune@imgtec.com> reports:
      
      The genex.S file appears to mix the case of a macro between its definition and
      use. A cut down example of this is below. The macro __build_clear_none has
      lower case 'build' but ends up being instantiated with upper case BUILD. Can
      this be fixed on master. It has been picked up by the LLVM integrated assembler
      which is currently case sensitive. We are likely to fix the assembler as well
      but the code is currently inconsistent in the kernel.
      
       .macro __build_clear_none
       .endm
      
       .macro __BUILD_HANDLER exception handler clear verbose ext
       .align 5
       .globl handle_\exception; .align 2; .type handle_\exception, @function; .ent
      handle_\exception, 0; handle_\exception: .frame $29, 184, $29
       .set noat
       .globl handle_\exception\ext; .type handle_\exception\ext, @function;
      handle_\exception\ext:
       __BUILD_clear_\clear
       .endm
      
       .macro BUILD_HANDLER exception handler clear verbose
       __BUILD_HANDLER \exception \handler \clear \verbose _int
       .endm
      
      BUILD_HANDLER ftlb ftlb none silent
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Reported-by: NMatthew Fortune <Matthew.Fortune@imgtec.com>
      158d3b2a
  3. 08 4月, 2015 1 次提交
  4. 28 3月, 2015 2 次提交
    • J
      MIPS: Clear [MSA]FPE CSR.Cause after notify_die() · 64bedffe
      James Hogan 提交于
      When handling floating point exceptions (FPEs) and MSA FPEs the Cause
      bits of the appropriate control and status register (FCSR for FPEs and
      MSACSR for MSA FPEs) are read and cleared before enabling interrupts,
      presumably so that it doesn't have to go through the pain of restoring
      those bits if the process is pre-empted, since writing those bits would
      cause another immediate exception while still in the kernel.
      
      The bits aren't normally ever restored again, since userland never
      expects to see them set.
      
      However for virtualisation it is necessary for the kernel to be able to
      restore these Cause bits, as the guest may have been interrupted in an
      FP exception handler but before it could read the Cause bits. This can
      be done by registering a die notifier, to get notified of the exception
      when such a value is restored, and if the PC was at the instruction
      which is used to restore the guest state, the handler can step over it
      and continue execution. The Cause bits can then remain set without
      causing further exceptions.
      
      For this to work safely a few changes are made:
      - __build_clear_fpe and __build_clear_msa_fpe no longer clear the Cause
        bits, and now return from exception level with interrupts disabled
        instead of enabled.
      - do_fpe() now clears the Cause bits and enables interrupts after
        notify_die() is called, so that the notifier can chose to return from
        exception without this happening.
      - do_msa_fpe() acts similarly, but now actually makes use of the second
        argument (msacsr) and calls notify_die() with the new DIE_MSAFP,
        allowing die notifiers to be informed of MSA FPEs too.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      64bedffe
    • P
      MIPS: clear MSACSR cause bits when handling MSA FP exception · 091be550
      Paul Burton 提交于
      Much like for traditional scalar FP exceptions, the cause bits in the
      MSACSR register need to be cleared following an MSA FP exception.
      Without doing so the exception will simply be raised again whenever
      the kernel restores MSACSR from a tasks saved context, leading to
      undesirable spurious exceptions. Clear the cause bits from the
      handle_msa_fpe function, mirroring the way handle_fpe clears the
      cause bits in FCSR.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/9164/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      091be550
  5. 17 2月, 2015 1 次提交
  6. 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
  7. 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
  8. 01 4月, 2014 1 次提交
    • R
      MIPS: Fix gigaton of warning building with microMIPS. · a809d460
      Ralf Baechle 提交于
      With binutils 2.24 the attempt to switch with microMIPS mode to MIPS III
      mode through .set mips3 results in *lots* of warnings like
      
      {standard input}: Assembler messages:
      {standard input}:397: Warning: the 64-bit MIPS architecture does not support the `smartmips' extension
      
      during a kernel build.  Fixed by using .set arch=r4000 instead.
      
      This breaks support for building the kernel with binutils 2.13 which
      was supported for 32 bit kernels only anyway and 2.14 which was a bad
      vintage for MIPS anyway.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a809d460
  9. 27 3月, 2014 2 次提交
    • P
      MIPS: Dumb MSA FP exception handler · 2bcb3fbc
      Paul Burton 提交于
      This patch adds a simple handler for MSA FP exceptions which delivers a
      SIGFPE to the running task. In the future it should probably be extended
      to re-execute the instruction with the MSACSR.NX bit set in order to
      generate results for any elements which did not cause an exception
      before delivering the SIGFPE signal.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/6432/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      2bcb3fbc
    • P
      MIPS: Basic MSA context switching support · 1db1af84
      Paul Burton 提交于
      This patch adds support for context switching the MSA vector registers.
      These 128 bit vector registers are aliased with the FP registers - an
      FP register accesses the least significant bits of the vector register
      with which it is aliased (ie. the register with the same index). Due to
      both this & the requirement that the scalar FPU must be 64-bit (FR=1) if
      enabled at the same time as MSA the kernel will enable MSA & scalar FP
      at the same time for tasks which use MSA. If we restore the MSA vector
      context then we might as well enable the scalar FPU since the reason it
      was left disabled was to allow for lazy FP context restoring - but we
      just restored the FP context as it's a subset of the vector context. If
      we restore the FP context and have previously used MSA then we have to
      restore the whole vector context anyway (see comment in
      enable_restore_fp_context for details) so similarly we might as well
      enable MSA.
      
      Thus if a task does not use MSA then it will continue to behave as
      without this patch - the scalar FP context will be saved & restored as
      usual. But if a task executes an MSA instruction then it will save &
      restore the vector context forever more.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/6431/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      1db1af84
  10. 23 1月, 2014 1 次提交
  11. 30 10月, 2013 1 次提交
  12. 22 5月, 2013 1 次提交
    • R
      MIPS: Idle: Break r4k_wait into two functions and fix it. · 087d990b
      Ralf Baechle 提交于
      local_irq_enable() may expand into very different code, so it rather should
      stay in C.  Also this keeps the assembler code size constant which keeps
      the rollback code simple.  So it's best to split r4k_wait into two parts,
      one C and one assembler.
      
      Finally add the local_irq_enable() to r4k_wait to ensure the WAIT
      instruction in __r4k_wait() will work properly.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      087d990b
  13. 17 5月, 2013 1 次提交
  14. 09 5月, 2013 1 次提交
  15. 08 5月, 2013 1 次提交
  16. 01 2月, 2013 1 次提交
  17. 29 12月, 2012 1 次提交
  18. 31 1月, 2009 1 次提交
  19. 11 1月, 2009 1 次提交
  20. 11 10月, 2008 1 次提交
  21. 04 10月, 2008 1 次提交
  22. 21 9月, 2008 1 次提交
  23. 29 1月, 2008 1 次提交
    • M
      [MIPS] R4000/R4400 daddiu erratum workaround · 619b6e18
      Maciej W. Rozycki 提交于
       This complements the generic R4000/R4400 errata workaround code and adds 
      bits for the daddiu problem.  In most places it just modifies handwritten 
      assembly code so that the assembler is allowed to use a temporary register 
      as daddiu may now be treated as a macro that expands to a sequence of li 
      and daddu.  It is the AT register or, where AT is unavailable or used 
      explicitly for another purpose, an explicitly-named register is selected, 
      using the .set at=<reg> feature added recently to gas.  This feature is 
      only used if CONFIG_CPU_DADDI_WORKAROUNDS has been set, so if the 
      workaround remains disabled, the required version of binutils stays 
      unchanged.
      
       Similarly, daddiu instructions put in branch delay slots in noreorder 
      fragments are now taken out of them and the assembler is allowed to 
      reorder them itself as possible (which it does making the whole idea of 
      scheduling them into delay slots manually questionable).
      
       Also in the very few places where such a simple conversion was not 
      possible, a handcoded longer sequence is implemented.
      
       Other than that there are changes to code responsible for building the 
      TLB fault and page clear/copy handlers to avoid daddiu as appropriate.  
      These are only effective if the erratum is verified to be present at the 
      run time.
      
       Finally there is a trivial update to __delay(), because it uses daddiu in 
      a branch delay slot.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      619b6e18
  24. 16 11月, 2007 1 次提交
  25. 13 7月, 2007 1 次提交
    • K
      [MIPS] SMTC: Interrupt mask backstop hack · 0db34215
      Kevin D. Kissell 提交于
      To support multiple TC microthreads acting as "CPUs" within a VPE,
      VPE-wide interrupt mask bits must be specially manipulated during
      interrupt handling. To support legacy drivers and interrupt controller
      management code, SMTC has a "backstop" to track and if necessary restore
      the interrupt mask. This has some performance impact on interrupt service
      overhead. Disable it only if you know what you are doing.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0db34215
  26. 30 3月, 2007 1 次提交
  27. 20 3月, 2007 2 次提交
  28. 30 11月, 2006 1 次提交
  29. 10 10月, 2006 1 次提交
  30. 08 10月, 2006 1 次提交
  31. 02 10月, 2006 1 次提交
  32. 14 7月, 2006 2 次提交
  33. 01 7月, 2006 1 次提交
  34. 30 6月, 2006 1 次提交
  35. 19 4月, 2006 1 次提交