1. 30 10月, 2007 1 次提交
    • R
      [MIPS] MT: Fix bug in multithreaded kernels. · a76ab5c1
      Ralf Baechle 提交于
      When GDB writes a breakpoint into address area of inferior process the
      kernel needs to invalidate the modified memory in the inferior which
      is done by calling flush_cache_page which in turns calls
      r4k_flush_cache_page and local_r4k_flush_cache_page for VSMP or SMTC
      kernel via r4k_on_each_cpu().
      
      As the VSMP and SMTC SMP kernels for 34K are running on a single shared
      caches it is possible to get away without interprocessor function calls.
      This optimization is implemented in r4k_on_each_cpu, so
      local_r4k_flush_cache_page is only ever called on the local CPU.
      
      This is where the following code in local_r4k_flush_cache_page() strikes:
      
              /*
               * If ownes no valid ASID yet, cannot possibly have gotten
               * this page into the cache.
               */
              if (cpu_context(smp_processor_id(), mm) == 0)
                      return;
      
      On VSMP and SMTC had a function of cpu_context() for each CPU(TC).
      
      So in case another CPU than the CPU executing local_r4k_cache_flush_page
      has not accessed the mm but one of the other CPUs has there may be data
      to be flushed in the cache yet local_r4k_cache_flush_page will falsely
      return leaving the I-cache inconsistent for the breakpoint.
      
      While the issue was discovered with GDB it also exists in
      local_r4k_flush_cache_range() and local_r4k_flush_cache().
      
      Fixed by introducing a new function has_valid_asid which on MT kernels
      returns true if a mm is active on any processor in the system.
      
      This is relativly expensive since for memory acccesses in that loop
      cache misses have to be assumed but it seems the most viable solution
      for 2.6.23 and older -stable kernels.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a76ab5c1
  2. 17 10月, 2007 1 次提交
  3. 12 10月, 2007 4 次提交
  4. 01 8月, 2007 1 次提交
  5. 11 7月, 2007 1 次提交
  6. 30 11月, 2006 2 次提交
  7. 02 10月, 2006 1 次提交
  8. 27 9月, 2006 4 次提交
    • R
      [MIPS] c-r4k: Convert init functions from inline to __init. · a00f6310
      Ralf Baechle 提交于
      With more recent compilers inline doesn't necessarily means a function
      will always be inlined.  So leave that decission to the compiler and
      make the function as __init.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      a00f6310
    • A
      [MIPS] Do not use drop_mmu_context to flusing other task's VIPT I-cache. · f6502791
      Atsushi Nemoto 提交于
      c-r4k.c and c-sb1.c use drop_mmu_context() to flush virtually tagged
      I-caches, but this does not work for flushing other task's icache.  This
      is for example triggered by copy_to_user_page() called from ptrace(2).
      Use indexed flush for such cases.
      Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f6502791
    • R
      [MIPS] Retire flush_icache_page from mm use. · 585fa724
      Ralf Baechle 提交于
      On the 34K the redundant cache operations were causing excessive stalls
      resulting in realtime code running on the second VPE missing its deadline.
      For all other platforms this patch is just a significant performance
      improvment as illustrated by below benchmark numbers.
      
      Processor, Processes - times in microseconds - smaller is better
      ------------------------------------------------------------------------------
      Host                 OS  Mhz null null      open slct sig  sig  fork exec sh
                                   call  I/O stat clos TCP  inst hndl proc proc proc
      --------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
      25Kf      2.6.18-rc4     533 0.49 1.16 7.57 33.4 30.5 1.34 12.4 5497 17.K 54.K
      25Kf      2.6.18-rc4-p   533 0.49 1.16 6.68 23.0 30.7 1.36 8.55 5030 16.K 48.K
      4Kc       2.6.18-rc4      80 4.21 15.0 131. 289. 261. 16.5 258. 18.K 70.K 227K
      4Kc       2.6.18-rc4-p    80 4.34 13.1 128. 285. 262. 18.2 258. 12.K 52.K 176K
      34Kc      2.6.18-rc4      40 5.01 14.0 61.6 90.0 477. 17.9 94.7 29.K 108K 342K
      34Kc      2.6.18-rc4-p    40 4.98 13.9 61.2 89.7 475. 17.6 93.7 8758 44.K 158K
      BCM1480   2.6.18-rc4     700 0.28 0.60 3.68 5.92 16.0 0.78 5.08 931. 3163 15.K
      BCM1480   2.6.18-rc4-p   700 0.28 0.61 3.65 5.85 16.0 0.79 5.20 395. 1464 8385
      TX49-16K  2.6.18-rc3     197 0.73 2.41 19.0 37.8 82.9 2.94 17.5 4438 14.K 56.K
      TX49-16K  2.6.18-rc3-p   197 0.73 2.40 19.9 36.3 82.9 2.94 23.4 2577 9103 38.K
      TX49-32K  2.6.18-rc3     396 0.36 1.19 6.80 11.8 41.0 1.46 8.17 2738 8465 32.K
      TX49-32K  2.6.18-rc3-p   396 0.36 1.19 6.82 10.2 41.0 1.46 8.18 1330 4638 18.K
          
      Original patch by me with enhancements by Atsushi Nemoto.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      585fa724
    • R
      [MIPS] c-r4k: Typo fix. · df586d59
      Ralf Baechle 提交于
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      df586d59
  9. 14 7月, 2006 4 次提交
  10. 01 7月, 2006 1 次提交
  11. 30 6月, 2006 4 次提交
  12. 06 6月, 2006 1 次提交
  13. 01 6月, 2006 3 次提交
  14. 19 4月, 2006 3 次提交
  15. 21 3月, 2006 1 次提交
  16. 19 3月, 2006 1 次提交
  17. 01 3月, 2006 1 次提交
  18. 15 2月, 2006 1 次提交
  19. 07 2月, 2006 1 次提交
  20. 10 1月, 2006 1 次提交
  21. 30 10月, 2005 3 次提交