1. 26 9月, 2014 1 次提交
    • P
      MIPS: Fix MFC1 & MFHC1 emulation for 64-bit MIPS systems · c8c0da6b
      Paul Burton 提交于
      Commit bbd426f5 "MIPS: Simplify FP context access" modified the
      SIFROMREG & SIFROMHREG macros such that they return unsigned rather
      than signed 32b integers. I had believed that to be fine, but
      inadvertently missed the MFC1 & MFHC1 cases which write to a struct
      pt_regs regs element. On MIPS32 this is fine, but on 64 bit those
      saved regs' fields are 64 bit wide. Using unsigned values caused the
      32 bit value from the FP register to be zero rather than sign extended
      as the architecture specifies, causing incorrect emulation of the
      MFC1 & MFHc1 instructions. Fix by reintroducing the casts to signed
      integers, and therefore the sign extension.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: stable@vger.kernel.org # v3.15+
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/7848/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c8c0da6b
  2. 31 7月, 2014 1 次提交
  3. 31 5月, 2014 1 次提交
  4. 30 5月, 2014 1 次提交
  5. 23 5月, 2014 5 次提交
    • R
      MIPS: math-emu: Reduce microMIPS bloat. · 70e4c234
      Ralf Baechle 提交于
      Move microMIPS32_to_MIPS32() to a separate file which only gets built
      for mipsMIPS configurations; for other configurations the optimizer
      eleminates calls to microMIPS32_to_MIPS32().
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      70e4c234
    • R
      MIPS: math-emu: Switch to using the MIPS rounding modes. · 56a64733
      Ralf Baechle 提交于
      Previously math-emu was using the IEEE-754 constants internally.  These
      were differing by having the constants for rounding to +/- infinity
      switched, so a conversion was necessary.  This would be entirely
      avoidable if the MIPS constants were used throughout, so get rid of
      the bloat.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      56a64733
    • R
      MIPS: Sort out mm_isBranchInstr. · 76fbfc31
      Ralf Baechle 提交于
      mm_isBranchInstr() did reside in the math emu code even though it logically
      is separate and also is used outside the math emu code.  In addition GCC 4.9.0
      leaves the following unnnecessarily bloated function body for a non-microMIPS
      configuration:
      
      <mm_isBranchInstr>:
          105c:       afa50004        sw      a1,4(sp)
          1060:       afa60008        sw      a2,8(sp)
          1064:       afa7000c        sw      a3,12(sp)
          1068:       03e00008        jr      ra
          106c:       00001021        move    v0,zero
      
      which stores arguments that are never going to be used on the stack frame.
      
      Move mm_isBranchInstr() from cp1emu.c to branch.c, then split mm_isBranchInstr()
      into a __mm_isBranchInstr() core and a mm_isBranchInstr() wrapper inline function
      which only invokes __mm_isBranchInstr() on microMIPS configurations.
      
      This shaves off 112 bytes off the kernel and improves code flow a bit.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      76fbfc31
    • R
      MIPS: math-emu: Cleanup coding style. · 3f7cac41
      Ralf Baechle 提交于
       o Only define variables in the outermost block
       o One empty line at most
       o Format comments as per CodingStyle
       o Update FSF address in licensing term comment
       o Spell FPU and MIPS in all capitals.
       o Remove ####-type of lines in comments.
       o Try to make things a bit most consistent between sp_*.c / dp_*.c files.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      3f7cac41
    • R
      MIPS: math-emu: Convert debug printks to pr_debug getting. · 92df0f8b
      Ralf Baechle 提交于
      And another bunch of #ifdefs bite the dust.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      92df0f8b
  6. 21 5月, 2014 6 次提交
  7. 27 3月, 2014 2 次提交
  8. 12 3月, 2014 1 次提交
  9. 14 1月, 2014 3 次提交
  10. 26 8月, 2013 1 次提交
  11. 21 8月, 2013 1 次提交
  12. 01 7月, 2013 1 次提交
  13. 09 5月, 2013 1 次提交
  14. 01 2月, 2013 1 次提交
  15. 14 12月, 2012 1 次提交
  16. 08 12月, 2011 1 次提交
    • M
      MIPS Kprobes: Refactor branch emulation · d8d4e3ae
      Maneesh Soni 提交于
      This patch refactors MIPS branch emulation code so as to allow skipping
      delay slot instruction in case of branch likely instructions when branch is
      not taken. This is useful for keeping the code common for use cases like
      kprobes where one would like to handle the branch instructions keeping the
      delay slot instuction also in picture for branch likely instructions. Also
      allow emulation when instruction to be decoded is not at pt_regs->cp0_epc
      as in case of kprobes where pt_regs->cp0_epc points to the breakpoint
      instruction.
      
      The patch also exports the function for modules.
      Signed-off-by: NManeesh Soni <manesoni@cisco.com>
      Signed-off-by: NVictor Kamensky <kamensky@cisco.com>
      Cc: David Daney <david.daney@cavium.com>
      Cc: ananth@in.ibm.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/2913/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      d8d4e3ae
  17. 01 7月, 2011 1 次提交
    • P
      perf: Remove the nmi parameter from the swevent and overflow interface · a8b0ca17
      Peter Zijlstra 提交于
      The nmi parameter indicated if we could do wakeups from the current
      context, if not, we would set some state and self-IPI and let the
      resulting interrupt do the wakeup.
      
      For the various event classes:
      
        - hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from
          the PMI-tail (ARM etc.)
        - tracepoint: nmi=0; since tracepoint could be from NMI context.
        - software: nmi=[0,1]; some, like the schedule thing cannot
          perform wakeups, and hence need 0.
      
      As one can see, there is very little nmi=1 usage, and the down-side of
      not using it is that on some platforms some software events can have a
      jiffy delay in wakeup (when arch_irq_work_raise isn't implemented).
      
      The up-side however is that we can remove the nmi parameter and save a
      bunch of conditionals in fast paths.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Michael Cree <mcree@orcon.net.nz>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Eric B Munson <emunson@mgebm.net>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Link: http://lkml.kernel.org/n/tip-agjev8eu666tvknpb3iaj0fg@git.kernel.orgSigned-off-by: NIngo Molnar <mingo@elte.hu>
      a8b0ca17
  18. 17 12月, 2010 1 次提交
  19. 30 10月, 2010 1 次提交
  20. 18 10月, 2010 1 次提交
  21. 22 5月, 2010 1 次提交
  22. 16 5月, 2010 1 次提交
    • S
      MIPS FPU emulator: allow Cause bits of FCSR to be writeable by ctc1 · 95e8f634
      Shane McDonald 提交于
          
          In the FPU emulator code of the MIPS, the Cause bits of the FCSR register
          are not currently writeable by the ctc1 instruction.  In odd corner cases,
          this can cause problems.  For example, a case existed where a divide-by-zero
          exception was generated by the FPU, and the signal handler attempted to
          restore the FPU registers to their state before the exception occurred.  In
          this particular setup, writing the old value to the FCSR register would
          cause another divide-by-zero exception to occur immediately.  The solution
          is to change the ctc1 instruction emulator code to allow the Cause bits of
          the FCSR register to be writeable.  This is the behaviour of the hardware
          that the code is emulating.
          
          This problem was found by Shane McDonald, but the credit for the fix goes
          to Kevin Kissell.  In Kevin's words:
          
          I submit that the bug is indeed in that ctc_op:  case of the emulator.  The
          Cause bits (17:12) are supposed to be writable by that instruction, but the
          CTC1 emulation won't let them be updated by the instruction.  I think that
          actually if you just completely removed lines 387-388 [...] things would
          work a good deal better.  At least, it would be a more accurate emulation of
          the architecturally defined FPU.  If I wanted to be really, really pedantic
          (which I sometimes do), I'd also protect the reserved bits that aren't
          necessarily writable.
      Signed-off-by: NShane McDonald <mcdonald.shane@gmail.com>
          To: anemo@mba.ocn.ne.jp
          To: kevink@paralogos.com
          To: sshtylyov@mvista.com
          Patchwork: http://patchwork.linux-mips.org/patch/1205/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      
      ---
      95e8f634
  23. 17 12月, 2009 1 次提交
    • D
      MIPS: Collect FPU emulator statistics per-CPU. · b6ee75ed
      David Daney 提交于
      On SMP systems, the collection of statistics can cause cache line
      bouncing in the lines associated with the counters.  Also there are
      races incrementing the counters on multiple CPUs.
      
      To fix both problems, we collect the statistics in per-CPU variables,
      and add them up in the debugfs read operation.
      
      As a test I ran the LTP float_bessel test on a 12 CPU Octeon system.
      
      Without CONFIG_DEBUG_FS :             2602 seconds.
      With CONFIG_DEBUG_FS:                 2640 seconds.
      With non-cpu-local atomic statistics: 14569 seconds.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      Cc: linux-mips@linux-mips.org
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      b6ee75ed
  24. 14 11月, 2009 1 次提交
    • D
      MIPS: Fix emulation of 64-bit FPU on FPU-less 64-bit CPUs. · da0bac33
      David Daney 提交于
      Running a 64-bit kernel on a 64-bit CPU without an FPU would cause the
      emulator to run in 32-bit mode.  The c0_Status.FR bit is wired to zero
      on systems without an FPU, so using that bit to decide how the emulator
      behaves doesn't allow for proper emulation on 64-bit FPU-less
      processors.
      
      Instead, we need to select the emulator mode based on the user-space
      ABI.  Since the thread flag TIF_32BIT_REGS is used to set c0_Status.FR,
      we can just use it to decide if the emulator should be in 32-bit or
      64-bit mode.
      Signed-off-by: NDavid Daney <ddaney@caviumnetworks.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      da0bac33
  25. 30 10月, 2008 1 次提交
  26. 28 10月, 2008 1 次提交
  27. 12 10月, 2007 2 次提交