1. 20 8月, 2009 1 次提交
  2. 11 3月, 2009 2 次提交
  3. 23 2月, 2009 1 次提交
  4. 13 1月, 2009 1 次提交
  5. 21 12月, 2008 1 次提交
    • B
      powerpc/mm: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED · 64b3d0e8
      Benjamin Herrenschmidt 提交于
      Currently, we never set _PAGE_COHERENT in the PTEs, we just OR it in
      in the hash code based on some CPU feature bit.  We also manipulate
      _PAGE_NO_CACHE and _PAGE_GUARDED by hand in all sorts of places.
      
      This changes the logic so that instead, the PTE now contains
      _PAGE_COHERENT for all normal RAM pages thay have I = 0 on platforms
      that need it.  The hash code clears it if the feature bit is not set.
      
      It also adds some clean accessors to setup various valid combinations
      of access flags and change various bits of code to use them instead.
      
      This should help having the PTE actually containing the bit
      combinations that we really want.
      
      I also removed _PAGE_GUARDED from _PAGE_BASE on 44x and instead
      set it explicitely from the TLB miss.  I will ultimately remove it
      completely as it appears that it might not be needed after all
      but in the meantime, having it in the TLB miss makes things a
      lot easier.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      64b3d0e8
  6. 21 11月, 2008 1 次提交
    • J
      powerpc/spufs: Fix spinning in spufs_ps_fault on signal · 60657263
      Jeremy Kerr 提交于
      Currently, we can end up in an infinite loop if we get a signal
      while the kernel has faulted in spufs_ps_fault. Eg:
      
       alarm(1);
      
       write(fd, some_spu_psmap_register_address, 4);
      
      - the write's copy_from_user will fault on the ps mapping, and
      signal_pending will be non-zero. Because returning from the fault
      handler will never clear TIF_SIGPENDING, so we'll just keep faulting,
      resulting in an unkillable process using 100% of CPU.
      
      This change returns VM_FAULT_SIGBUS if there's a fatal signal pending,
      letting us escape the loop.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      60657263
  7. 21 10月, 2008 4 次提交
    • J
      powerpc/spufs: Use kmalloc rather than kzalloc for switch log buffer · 837ef884
      Jeremy Kerr 提交于
      No need to zero the entire buffer, just the head and tail indices.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      837ef884
    • J
      powerpc/spufs: Don't spu_acquire_saved unnecessarily in regs read · f027faa2
      Jeremy Kerr 提交于
      With most file readers (eg cat, dd), reading a context's regs file will
      result in two reads: the first to read the data, and the second to
      return EOF. Because each read performs a spu_acquire_saved, we end up
      descheduling and re-scheduling the context twice.
      
      This change does a simple check to see if we'd return EOF before
      calling spu_acquire_saved(), saving the extra schedule operation.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      f027faa2
    • J
      powerpc/spufs: Don't require full buffer in switch_log read · 14f693ee
      Jeremy Kerr 提交于
      Currently, read() on the sputrace log will block until the read buffer
      is full. This makes it difficult to retrieve the end of the buffer, as
      the user will need to read with the right-sized buffer.
      
      In a similar method as 91553a1b5e0df006a3573a88d98ee7cd48a3818a, this
      change makes the switch_log return if there has already been data
      read.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      14f693ee
    • J
      powerpc/spufs: Use state_mutex for switch_log locking, and prevent multiple openers · f5ed0eb6
      Jeremy Kerr 提交于
      Currently, we use ctx->mapping_lock and ctx->switch_log->lock for the
      context switch log. The mapping lock only prevents concurrent open()s,
      so we require the switch_lock->lock for reads.
      
      Since writes to the switch log buffer occur on context switches, we're
      better off synchronising with the state_mutex, which is held during a
      switch. Since we're serialised througout the buffer reads and writes,
      we can use the state mutex to protect open and release too, and
      can now kfree() the log buffer on release. This allows us to perform
      the switch log notify without taking any extra locks.
      
      Because the buffer is only present while the file is open, we can use
      it to prevent multiple simultaneous openers.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      f5ed0eb6
  8. 25 7月, 2008 1 次提交
  9. 09 7月, 2008 5 次提交
  10. 30 6月, 2008 1 次提交
  11. 15 5月, 2008 1 次提交
  12. 30 4月, 2008 1 次提交
  13. 19 4月, 2008 1 次提交
  14. 01 4月, 2008 1 次提交
  15. 28 3月, 2008 1 次提交
  16. 27 2月, 2008 1 次提交
    • J
      [POWERPC] spufs: fix context destruction during psmap fault · d5883137
      Jeremy Kerr 提交于
      We have a small window where a spu context may be destroyed while
      we're servicing a page fault (from another thread) to the context's
      problem state mapping.
      
      After we up_read() the mmap_sem, it's possible that the context is
      destroyed by its owning thread, and so the later references to ctx
      are invalid. This can maifest as a deadlock on the (now free()-ed)
      context state mutex.
      
      This change adds a reference to the context before we release the
      mmap_sem, so that the context cannot be destroyed.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      d5883137
  17. 09 2月, 2008 2 次提交
  18. 08 2月, 2008 1 次提交
  19. 06 2月, 2008 1 次提交
  20. 21 12月, 2007 5 次提交
  21. 20 10月, 2007 1 次提交
  22. 26 9月, 2007 1 次提交
  23. 19 9月, 2007 5 次提交