1. 11 11月, 2015 1 次提交
    • P
      MIPS: Allow RIXI for 32-bit kernels on MIPS64 · 033549c6
      Paul Burton 提交于
      Commit a68d09a1 ("MIPS: Don't use RI/XI with 32-bit kernels on
      64-bit CPUs") prevented use of RIXI on MIPS64 systems, stating that the
      "TLB handlers cannot handle this case". What they actually couldn't
      handle was cases where there were less fill bits in the Entry{Lo,Hi}
      registers than bits used by software in PTEs. The handlers can now deal
      with this case, so enable RIXI for MIPS32 kernels on MIPS64 systems.
      
      Note that beyond the obvious benefits provided by having RIXI on such
      systems, this is required for systems implementing MIPSr6 where RIXI
      cannot be disabled.
      
      This reverts commit a68d09a1 ("MIPS: Don't use RI/XI with 32-bit
      kernels on 64-bit CPUs").
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Joshua Kinard <kumba@gentoo.org>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@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>
      Patchwork: https://patchwork.linux-mips.org/patch/11219/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      033549c6
  2. 23 9月, 2015 1 次提交
  3. 03 9月, 2015 1 次提交
  4. 22 6月, 2015 1 次提交
    • 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
  5. 10 4月, 2015 1 次提交
  6. 08 4月, 2015 2 次提交
  7. 31 3月, 2015 1 次提交
  8. 20 3月, 2015 1 次提交
  9. 17 2月, 2015 4 次提交
  10. 24 11月, 2014 1 次提交
  11. 22 9月, 2014 1 次提交
  12. 02 8月, 2014 3 次提交
  13. 31 5月, 2014 1 次提交
  14. 21 5月, 2014 1 次提交
  15. 27 3月, 2014 2 次提交
  16. 23 1月, 2014 2 次提交
  17. 24 9月, 2013 1 次提交
  18. 18 9月, 2013 1 次提交
  19. 05 8月, 2013 1 次提交
    • R
      MIPS: oprofile: Fix BUG due to smp_processor_id() in preemptible code. · cf5b2d23
      Ralf Baechle 提交于
      current_cpu_type() is not preemption-safe.
      If CONFIG_PREEMPT is enabled then mipsxx_reg_setup() can be called from preemptible state.
      Added get_cpu()/put_cpu() pair to make it preemption-safe.
      
      This was found while testing oprofile with CONFIG_DEBUG_PREEMPT enable.
      
      /usr/zntestsuite # opcontrol --init
      /usr/zntestsuite # opcontrol --setup --event=L2_CACHE_ACCESSES:500 --event=L2_CACHE_MISSES:500 --no-vmlinux
      /usr/zntestsuite # opcontrol --start
      Using 2.6+ OProfile kernel interface.
      BUG: using smp_processor_id() in preemptible [00000000] code: oprofiled/1362
      caller is mipsxx_reg_setup+0x11c/0x164
      CPU: 0 PID: 1362 Comm: oprofiled Not tainted 3.10.4 #18
      Stack : 00000006 70757465 00000000 00000000 00000000 00000000 80b173f6 00000037
                80b10000 00000000 80b21614 88f5a220 00000000 00000000 00000000 00000000
                00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
                00000000 00000000 00000000 89c49c00 89c49c2c 80721254 807b7927 8012c1d0
                80b10000 80721254 00000000 00000552 88f5a220 80b1335c 807b78e6 89c49ba8
                ...
      Call Trace:
      [<801099a4>] show_stack+0x64/0x7c
      [<80665520>] dump_stack+0x20/0x2c
      [<803a2250>] debug_smp_processor_id+0xe0/0xf0
      [<8052df24>] mipsxx_reg_setup+0x11c/0x164
      [<8052cd70>] op_mips_setup+0x24/0x4c
      [<80529cfc>] oprofile_setup+0x5c/0x12c
      [<8052b9f8>] event_buffer_open+0x78/0xf8
      [<801c3150>] do_dentry_open.isra.15+0x2b8/0x3b0
      [<801c3270>] finish_open+0x28/0x4c
      [<801d49b8>] do_last.isra.41+0x2cc/0xd00
      [<801d54a0>] path_openat+0xb4/0x4c4
      [<801d5c44>] do_filp_open+0x3c/0xac
      [<801c4744>] do_sys_open+0x110/0x1f4
      [<8010f47c>] stack_done+0x20/0x44
      
      Bug reported and original patch by Jerin Jacob <jerinjacobk@gmail.com>.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-by: NJerin Jacob <jerinjacobk@gmail.com>
      cf5b2d23
  20. 01 7月, 2013 3 次提交
  21. 08 5月, 2013 1 次提交
    • H
      MIPS: Build uasm-generated code only once to avoid CPU Hotplug problem · 8759934e
      Huacai Chen 提交于
      This and the next patch resolve memory corruption problems while CPU
      hotplug. Without these patches, memory corruption can triggered easily
      as below:
      
      On a quad-core MIPS platform, use "spawn" of UnixBench-5.1.3 (http://
      code.google.com/p/byte-unixbench/) and a CPU hotplug script like this
      (hotplug.sh):
      while true; do
      echo 0 >/sys/devices/system/cpu/cpu1/online
      echo 0 >/sys/devices/system/cpu/cpu2/online
      echo 0 >/sys/devices/system/cpu/cpu3/online
      sleep 1
      echo 1 >/sys/devices/system/cpu/cpu1/online
      echo 1 >/sys/devices/system/cpu/cpu2/online
      echo 1 >/sys/devices/system/cpu/cpu3/online
      sleep 1
      done
      
      Run "hotplug.sh" and then run "spawn 10000", spawn will get segfault
      after a few minutes.
      
      This patch:
      Currently, clear_page()/copy_page() are generated by Micro-assembler
      dynamically. But they are unavailable until uasm_resolve_relocs() has
      finished because jump labels are illegal before that. Since these
      functions are shared by every CPU, we only call build_clear_page()/
      build_copy_page() only once at boot time. Without this patch, programs
      will get random memory corruption (segmentation fault, bus error, etc.)
      while CPU Hotplug (e.g. one CPU is using clear_page() while another is
      generating it in cpu_cache_init()).
      
      For similar reasons we modify build_tlb_refill_handler()'s invocation.
      
      V2:
      1, Rework the code to make CPU#0 can be online/offline.
      2, Introduce cpu_has_local_ebase feature since some types of MIPS CPU
         need a per-CPU tlb_refill_handler().
      Signed-off-by: NHuacai Chen <chenhc@lemote.com>
      Signed-off-by: NHongbing Hu <huhb@lemote.com>
      Acked-by: NDavid Daney <david.daney@cavium.com>
      Patchwork: http://patchwork.linux-mips.org/patch/4994/Acked-by: NJohn Crispin <blogic@openwrt.org>
      8759934e
  22. 19 2月, 2013 1 次提交
  23. 17 2月, 2013 1 次提交
  24. 16 2月, 2013 1 次提交
    • S
      MIPS: Add printing of ISA version in cpuinfo. · a96102be
      Steven J. Hill 提交于
      Display the MIPS ISA version release in the /proc/cpuinfo file.
      
      [ralf@linux-mips.org: Add support for MIPS I ... IV legacy architecture
      revisions.  Also differenciate between MIPS32 and MIPS64 versions instead
      of lumping them together as just r1 and r2.
      
      Note to application programmers: this indicates the CPU's ISA level
      It does not imply the current execution environment does support it.  For
      example an O32 application seeing "mips64r2" would still be restricted by
      by the execution environment to 32-bit - but the kernel could run mips64r2
      code.  The same for a 32-bit kernel running on a 64-bit processor.  This
      field doesn't include ASEs or optional architecture modules nor other
      detailed flags such as the availability of an FPU.]
      Signed-off-by: NSteven J. Hill <sjhill@mips.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: http://patchwork.linux-mips.org/patch/4714/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a96102be
  25. 01 2月, 2013 1 次提交
  26. 11 10月, 2012 2 次提交
  27. 14 9月, 2012 2 次提交
  28. 05 8月, 2010 1 次提交