1. 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
  2. 01 2月, 2013 1 次提交
  3. 14 12月, 2012 1 次提交
  4. 19 7月, 2012 1 次提交
  5. 29 3月, 2012 1 次提交
  6. 27 2月, 2010 1 次提交
  7. 25 6月, 2009 1 次提交
  8. 12 3月, 2009 1 次提交
    • S
      MIPS: NEC VR5500 processor support fixup · a644b277
      Shinya Kuribayashi 提交于
      Current VR5500 processor support lacks of some functions which are
      expected to be configured/synthesized on arch initialization.
      
      Here're some VR5500A spec notes:
      
      * All execution hazards are handled in hardware.
      
      * Once VR5500A stops the operation of the pipeline by WAIT instruction,
        it could return from the standby mode only when either a reset, NMI
        request, or all enabled interrupts is/are detected.  In other words,
        if interrupts are disabled by Status.IE=0, it keeps in standby mode
        even when interrupts are internally asserted.
      
        Notes on WAIT: The operation of the processor is undefined if WAIT
        insn is in the branch delay slot.  The operation is also undefined
        if WAIT insn is executed when Status.EXL and Status.ERL are set to 1.
      
      * VR5500A core only implements the Load prefetch.
      
      With these changes, it boots fine.
      Signed-off-by: NShinya Kuribayashi <shinya.kuribayashi@necel.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a644b277
  9. 09 7月, 2008 1 次提交
  10. 16 6月, 2008 1 次提交
  11. 06 6月, 2008 1 次提交
  12. 29 4月, 2008 1 次提交
    • T
      [MIPS] Reimplement clear_page/copy_page · fb2a27e7
      Thiemo Seufer 提交于
      Fold the SB-1 specific implementation of clear_page/copy_page in the
      generic version, and rewrite that one in tlbex style. The immediate
      benefits:
        - It converts the compile-time workaround for SB-1 pass 1 prefetches
          to a more efficient run-time check.
        - It allows adjustment of loop unfolling, which helps to reduce the
          number of redundant cdex cache ops.
        - It fixes some esoteric cornercases (the cache line length calculations
          can go wrong, and support for 64k pages without prefetch instructions
          will overflow the addiu immediate).
        - Somewhat better guesses of "good" prefetch values.
      Signed-off-by: NThiemo Seufer <ths@networkno.de>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      fb2a27e7