1. 16 6月, 2008 2 次提交
  2. 05 5月, 2008 2 次提交
  3. 01 4月, 2008 1 次提交
  4. 29 2月, 2008 2 次提交
    • A
      [POWERPC] spufs: serialize SLB invalidation against SLB loading · c92a1acb
      Arnd Bergmann 提交于
      There is a potential race between flushes of the entire SLB in the MFC
      and the point where new entries are being established. The problem is
      that we might put a ESID entry into the MFC SLB when the VSID entry has
      just been cleared by the global flush.
      
      This can be circumvented by holding the register_lock throughout both
      the flushing and the creation of SLB entries.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      c92a1acb
    • A
      [POWERPC] spufs: invalidate SLB translation before adding a new entry · cc4b7c18
      Arnd Bergmann 提交于
      When we replace an SLB entry in the MFC after using up all the available
      entries, there is a short window in which an incorrect entry is marked
      as valid.
      
      The problem is that the 'valid' bit is stored in the ESID, which is
      always written after the VSID. Overwriting the VSID first will make the
      original ESID entry point to the new VSID, which means that any
      concurrent DMA accessing the old ESID ends up being redirected to the
      new virtual address.  A few cycles later, we write the new ESID and
      everything is fine again.
      
      That race can be closed by writing a zero entry to the ESID first, which
      makes sure that the VSID is not accessed until we write the new ESID.
      
      Note that we don't actually need to invalidate the SLB entry using the
      invalidation register, which would also flush any ERAT entries for that
      segment, because the segment translation does not become invalid but is
      only removed from the SLB cache.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      cc4b7c18
  5. 20 2月, 2008 1 次提交
  6. 25 1月, 2008 1 次提交
  7. 21 12月, 2007 2 次提交
  8. 19 12月, 2007 6 次提交
  9. 12 10月, 2007 1 次提交
    • P
      [POWERPC] Use 1TB segments · 1189be65
      Paul Mackerras 提交于
      This makes the kernel use 1TB segments for all kernel mappings and for
      user addresses of 1TB and above, on machines which support them
      (currently POWER5+, POWER6 and PA6T).
      
      We detect that the machine supports 1TB segments by looking at the
      ibm,processor-segment-sizes property in the device tree.
      
      We don't currently use 1TB segments for user addresses < 1T, since
      that would effectively prevent 32-bit processes from using huge pages
      unless we also had a way to revert to using 256MB segments.  That
      would be possible but would involve extra complications (such as
      keeping track of which segment size was used when HPTEs were inserted)
      and is not addressed here.
      
      Parts of this patch were originally written by Ben Herrenschmidt.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1189be65
  10. 19 9月, 2007 1 次提交
  11. 11 9月, 2007 1 次提交
  12. 10 8月, 2007 1 次提交
  13. 21 7月, 2007 9 次提交
  14. 18 7月, 2007 1 次提交
  15. 03 7月, 2007 2 次提交
  16. 28 6月, 2007 1 次提交
  17. 09 5月, 2007 1 次提交
    • B
      [POWERPC] Introduce address space "slices" · d0f13e3c
      Benjamin Herrenschmidt 提交于
      The basic issue is to be able to do what hugetlbfs does but with
      different page sizes for some other special filesystems; more
      specifically, my need is:
      
       - Huge pages
      
       - SPE local store mappings using 64K pages on a 4K base page size
      kernel on Cell
      
       - Some special 4K segments in 64K-page kernels for mapping a dodgy
      type of powerpc-specific infiniband hardware that requires 4K MMU
      mappings for various reasons I won't explain here.
      
      The main issues are:
      
       - To maintain/keep track of the page size per "segment" (as we can
      only have one page size per segment on powerpc, which are 256MB
      divisions of the address space).
      
       - To make sure special mappings stay within their allotted
      "segments" (including MAP_FIXED crap)
      
       - To make sure everybody else doesn't mmap/brk/grow_stack into a
      "segment" that is used for a special mapping
      
      Some of the necessary mechanisms to handle that were present in the
      hugetlbfs code, but mostly in ways not suitable for anything else.
      
      The patch relies on some changes to the generic get_unmapped_area()
      that just got merged.  It still hijacks hugetlb callbacks here or
      there as the generic code hasn't been entirely cleaned up yet but
      that shouldn't be a problem.
      
      So what is a slice ?  Well, I re-used the mechanism used formerly by our
      hugetlbfs implementation which divides the address space in
      "meta-segments" which I called "slices".  The division is done using
      256MB slices below 4G, and 1T slices above.  Thus the address space is
      divided currently into 16 "low" slices and 16 "high" slices.  (Special
      case: high slice 0 is the area between 4G and 1T).
      
      Doing so simplifies significantly the tracking of segments and avoids
      having to keep track of all the 256MB segments in the address space.
      
      While I used the "concepts" of hugetlbfs, I mostly re-implemented
      everything in a more generic way and "ported" hugetlbfs to it.
      
      Slices can have an associated page size, which is encoded in the mmu
      context and used by the SLB miss handler to set the segment sizes.  The
      hash code currently doesn't care, it has a specific check for hugepages,
      though I might add a mechanism to provide per-slice hash mapping
      functions in the future.
      
      The slice code provide a pair of "generic" get_unmapped_area() (bottomup
      and topdown) functions that should work with any slice size.  There is
      some trickiness here so I would appreciate people to have a look at the
      implementation of these and let me know if I got something wrong.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d0f13e3c
  18. 30 4月, 2007 1 次提交
  19. 24 4月, 2007 4 次提交