1. 24 4月, 2007 3 次提交
    • C
      [POWERPC] spufs: turn run_sema into run_mutex · e45d48a3
      Christoph Hellwig 提交于
      There is no reason for run_sema to be a struct semaphore.  Changing
      it to a mutex and rename it accordingly.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      e45d48a3
    • A
      [POWERPC] spufs: make spu page faults not block scheduling · 57dace23
      Arnd Bergmann 提交于
      Until now, we have always entered the spu page fault handler
      with a mutex for the spu context held. This has multiple
      bad side-effects:
      - it becomes impossible to suspend the context during
        page faults
      - if an spu program attempts to access its own mmio
        areas through DMA, we get an immediate livelock when
        the nopage function tries to acquire the same mutex
      
      This patch makes the page fault logic operate on a
      struct spu_context instead of a struct spu, and moves it
      from spu_base.c to a new file fault.c inside of spufs.
      
      We now also need to copy the dar and dsisr contents
      of the last fault into the saved context to have it
      accessible in case we schedule out the context before
      activating the page fault handler.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      57dace23
    • C
      [POWERPC] spufs: streamline locking for isolated spu setup · 7ec18ab9
      Christoph Hellwig 提交于
      For quite a while now spu state is protected by a simple mutex instead
      of the old rw_semaphore, and this means we can simplify the locking
      around spu_setup_isolated a lot.
      
      Instead of doing an spu_release before entering spu_setup_isolated and
      then calling the complicated spu_acquire_exclusive we can now simply
      enter the function locked an in guaranteed runnable state, so that the
      only bit of spu_acquire_exclusive that's left is the call to
      spu_unmap_mappings.
      
      Similarly there's no more need to unlock and reacquire the state_mutex
      when spu_setup_isolated is done, but we can always return with the
      lock held and only drop it in spu_run_init in the failure case.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      7ec18ab9
  2. 10 3月, 2007 1 次提交
  3. 14 2月, 2007 4 次提交
  4. 04 12月, 2006 5 次提交
  5. 25 10月, 2006 2 次提交
  6. 05 10月, 2006 1 次提交
    • A
      [POWERPC] spufs: implement error event delivery to user space · 9add11da
      Arnd Bergmann 提交于
      This tries to fix spufs so we have an interface closer to what is
      specified in the man page for events returned in the third argument of
      spu_run.
      
      Fortunately, libspe has never been using the returned contents of that
      register, as they were the same as the return code of spu_run (duh!).
      
      Unlike the specification that we never implemented correctly, we now
      require a SPU_CREATE_EVENTS_ENABLED flag passed to spu_create, in
      order to get the new behavior. When this flag is not passed, spu_run
      will simply ignore the third argument now.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      9add11da
  7. 01 4月, 2006 1 次提交
  8. 27 3月, 2006 1 次提交
    • A
      [PATCH] spufs: allow SPU code to do syscalls · 2dd14934
      Arnd Bergmann 提交于
      An SPU does not have a way to implement system calls
      itself, but it can create intercepts to the kernel.
      
      This patch uses the method defined by the JSRE interface
      for C99 host library calls from an SPU to implement
      Linux system calls. It uses the reserved SPU stop code
      0x2104 for this, using the structure layout and syscall
      numbers for ppc64-linux.
      
      I'm still undecided wether it is better to have a list
      of allowed syscalls or a list of forbidden syscalls,
      since we can't allow an SPU to call all syscalls that
      are defined for ppc64-linux.
      
      This patch implements the easier choice of them, with a
      blacklist that only prevents an SPU from calling anything
      that interacts with its own execution, e.g fork, execve,
      clone, vfork, exit, spu_run and spu_create and everything
      that deals with signals.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      2dd14934
  9. 09 1月, 2006 1 次提交