1. 01 12月, 2010 1 次提交
    • P
      sh: Assume new page cache pages have dirty dcache lines. · 55661fc1
      Paul Mundt 提交于
      This follows the ARM change c0177800
      ("ARM: 6379/1: Assume new page cache pages have dirty D-cache") for the
      same rationale:
      
          There are places in Linux where writes to newly allocated page
          cache pages happen without a subsequent call to flush_dcache_page()
          (several PIO drivers including USB HCD). This patch changes the
          meaning of PG_arch_1 to be PG_dcache_clean and always flush the
          D-cache for a newly mapped page in update_mmu_cache().
      
      This addresses issues seen with executing binaries from MMC, in
      addition to some of the other HCDs that don't explicitly do cache
      management for their pipe-in buffers.
      Requested-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      55661fc1
  2. 26 1月, 2010 1 次提交
    • P
      sh: Mass ctrl_in/outX to __raw_read/writeX conversion. · 9d56dd3b
      Paul Mundt 提交于
      The old ctrl in/out routines are non-portable and unsuitable for
      cross-platform use. While drivers/sh has already been sanitized, there
      is still quite a lot of code that is not. This converts the arch/sh/ bits
      over, which permits us to flag the routines as deprecated whilst still
      building with -Werror for the architecture code, and to ensure that
      future users are not added.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      9d56dd3b
  3. 21 1月, 2010 1 次提交
  4. 02 1月, 2010 1 次提交
  5. 09 12月, 2009 1 次提交
  6. 04 12月, 2009 1 次提交
    • M
      sh: Drop associative writes for SH-4 cache flushes. · a781d1e5
      Matt Fleming 提交于
      When flushing/invalidating the icache/dcache via the memory-mapped IC/OC
      address arrays, the associative bit should only be used in conjunction with
      virtual addresses. However, we currently flush cache lines based on physical
      address, so stop using the associative bit.
      
      It is a better strategy to use non-associative writes (and physical tags) for
      flushing the caches anyway, because flushing by virtual address (as with the
      A-bit set) requires a valid TLB entry for that virtual address. If one does not
      exist in the TLB no exception is generated and the flush is silently ignored.
      
      This is also future-proofing for SH-4A parts which are gradually phasing out
      associative writes to the cache array due to the aforementioned case of certain
      flushes silently turning in to nops.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      a781d1e5
  7. 09 11月, 2009 1 次提交
  8. 30 10月, 2009 1 次提交
  9. 16 10月, 2009 1 次提交
  10. 10 10月, 2009 2 次提交
  11. 09 10月, 2009 1 次提交
  12. 09 9月, 2009 6 次提交
    • P
      sh: Fix up redundant cache flushing for PAGE_SIZE > 4k. · c4845a4b
      Paul Mundt 提交于
      If PAGE_SIZE is presently over 4k we do a lot of extra flushing given
      that we purge the cache 4k at a time. Make it explicitly 4k per
      iteration, rather than iterating for PAGE_SIZE before looping over again.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      c4845a4b
    • P
      sh: Rework sh4_flush_cache_page() for coherent kmap mapping. · deaef20e
      Paul Mundt 提交于
      This builds on top of the MIPS r4k code that does roughly the same thing.
      This permits the use of kmap_coherent() for mapped pages with dirty
      dcache lines and falls back on kmap_atomic() otherwise.
      
      This also fixes up a problem with the alias check and defers to
      shm_align_mask directly.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      deaef20e
    • P
      sh: Kill off segment-based d-cache flushing on SH-4. · bd6df574
      Paul Mundt 提交于
      This kills off the unrolled segment based flushers on SH-4 and switches
      over to a generic unrolled approach derived from the writethrough segment
      flusher.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      bd6df574
    • P
      sh: Kill off broken PHYSADDR() usage in sh4_flush_dcache_page(). · 31c9efde
      Paul Mundt 提交于
      PHYSADDR() runs in to issues in 32-bit mode when we do not have the
      legacy P1/P2 areas mapped, as such, we need to use page_to_phys()
      directly, which also happens to do the right thing in legacy 29-bit mode.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      31c9efde
    • P
      sh: sh4_flush_cache_mm() optimizations. · 654d364e
      Paul Mundt 提交于
      The i-cache flush in the case of VM_EXEC was added way back when as a
      sanity measure, and in practice we only care about evicting aliases from
      the d-cache. As a result, it's possible to drop the i-cache flush
      completely here.
      
      After careful profiling it's also come up that all of the work associated
      with hunting down aliases and doing ranged flushing ends up generating
      more overhead than simply blasting away the entire dcache, particularly
      if there are many mm's that need to be iterated over. As a result of
      that, just move back to flush_dcache_all() in these cases, which restores
      the old behaviour, and vastly simplifies the path.
      
      Additionally, on platforms without aliases at all, this can simply be
      nopped out. Presently we have the alias check in the SH-4 specific
      version, but this is true for all of the platforms, so move the check up
      to a generic location. This cuts down quite a bit on superfluous cacheop
      IPIs.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      654d364e
    • P
      sh: Cleanup whitespace damage in sh4_flush_icache_range(). · 682f88ab
      Paul Mundt 提交于
      There was quite a lot of tab->space damage done here from a former patch,
      clean it up once and for all.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      682f88ab
  13. 01 9月, 2009 2 次提交
  14. 27 8月, 2009 1 次提交
  15. 24 8月, 2009 2 次提交
  16. 21 8月, 2009 2 次提交
  17. 20 8月, 2009 1 次提交
  18. 15 8月, 2009 6 次提交
  19. 04 8月, 2009 1 次提交
  20. 22 7月, 2009 1 次提交
    • P
      sh: Migrate from PG_mapped to PG_dcache_dirty. · 2277ab4a
      Paul Mundt 提交于
      This inverts the delayed dcache flush a bit to be more in line with other
      platforms. At the same time this also gives us the ability to do some
      more optimizations and cleanup. Now that the update_mmu_cache() callsite
      only tests for the bit, the implementation can gradually be split out and
      made generic, rather than relying on special implementations for each of
      the peculiar CPU types.
      
      SH7705 in 32kB mode and SH-4 still need slightly different handling, but
      this is something that can remain isolated in the varying page copy/clear
      routines. On top of that, SH-X3 is dcache coherent, so there is no need
      to bother with any of these tests in the PTEAEX version of
      update_mmu_cache(), so we kill that off too.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      2277ab4a
  21. 08 9月, 2008 1 次提交
  22. 28 7月, 2008 1 次提交
  23. 28 1月, 2008 1 次提交
  24. 24 9月, 2007 2 次提交
  25. 21 9月, 2007 1 次提交