1. 02 1月, 2010 3 次提交
    • M
      sh: Move page table allocation out of line · 2a5eacca
      Matt Fleming 提交于
      We also switched away from quicklists and instead moved to slab
      caches. After benchmarking both implementations the difference is
      negligible. The slab caches suit us better though because the size of a
      pgd table is just 4 entries when we're using a 3-level page table layout
      and quicklists always deal with pages.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      2a5eacca
    • M
      sh: Optimise flush_dcache_page() on SH4 · b4c89276
      Matt Fleming 提交于
      If the page is not mapped into any process's address space then aliases
      cannot exist in the cache. So reduce the amount of flushing we perform.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      b4c89276
    • M
      sh: Correct the PTRS_PER_PMD and PMD_SHIFT values · 3f5ab768
      Matt Fleming 提交于
      The previous expressions were wrong which made free_pmd_range() explode
      when using anything other than 4KB pages (which is why 8KB and 64KB
      pages were disabled with the 3-level page table layout).
      
      The problem was that pmd_offset() was returning an index of non-zero
      when it should have been returning 0. This non-zero offset was used to
      calculate the address of the pmd table to free in free_pmd_range(),
      which ended up trying to free an object that was not aligned on a page
      boundary.
      
      Now 3-level page tables should work with 4KB, 8KB and 64KB pages.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      3f5ab768
  2. 24 12月, 2009 1 次提交
  3. 17 12月, 2009 1 次提交
    • M
      sh: Definitions for 3-level page table layout · 5d9b4b19
      Matt Fleming 提交于
      If using 64-bit PTEs and 4K pages then each page table has 512 entries
      (as opposed to 1024 entries with 32-bit PTEs). Unlike MIPS, SH follows
      the convention that all structures in the page table (pgd_t, pmd_t,
      pgprot_t, etc) must be the same size. Therefore, 64-bit PTEs require
      64-bit PGD entries, etc. Using 2-levels of page tables and 64-bit PTEs
      it is only possible to map 1GB of virtual address space.
      
      In order to map all 4GB of virtual address space we need to adopt a
      3-level page table layout. This actually works out better for
      CONFIG_SUPERH32 because we only waste 2 PGD entries on the P1 and P2
      areas (which are untranslated) instead of 256.
      Signed-off-by: NMatt Fleming <matt@console-pimps.org>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      5d9b4b19
  4. 14 12月, 2009 1 次提交
  5. 11 12月, 2009 1 次提交
  6. 09 12月, 2009 3 次提交
  7. 04 12月, 2009 2 次提交
    • 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
    • P
      sh: Partial revert of copy/clear_user_highpage() optimizations. · 7e01c949
      Paul Mundt 提交于
      These still require more testing, so revert them for now. We keep the
      off-by-1 in the fixmap colouring and drop the rest.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      7e01c949
  8. 24 11月, 2009 1 次提交
    • S
      sh: Improve performance of SH4 versions of copy/clear_user_highpage · 39ac11c1
      Stuart Menefy 提交于
      The previous implementation of clear_user_highpage and copy_user_highpage
      checked to see if there was a D-cache aliasing issue between the user
      and kernel mappings of a page, but if there was they always did a
      flush with writeback on the dirtied kernel alias.
      
      However as we now have the ability to map a page into kernel space
      with the same cache colour as the user mapping, there is no need to
      write back this data.
      
      Currently we also invalidate the kernel alias as a precaution, however
      I'm not sure if this is actually required.
      
      Also correct the definition of FIX_CMAP_END so that the mappings created
      by kmap_coherent() are actually at the correct colour.
      Signed-off-by: NStuart Menefy <stuart.menefy@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      39ac11c1
  9. 12 11月, 2009 1 次提交
  10. 11 11月, 2009 1 次提交
  11. 09 11月, 2009 1 次提交
  12. 04 11月, 2009 1 次提交
  13. 30 10月, 2009 1 次提交
  14. 27 10月, 2009 3 次提交
  15. 26 10月, 2009 1 次提交
  16. 20 10月, 2009 1 次提交
  17. 16 10月, 2009 3 次提交
  18. 13 10月, 2009 1 次提交
  19. 10 10月, 2009 9 次提交
  20. 09 10月, 2009 4 次提交