1. 21 6月, 2006 2 次提交
  2. 27 3月, 2006 2 次提交
    • M
      [PATCH] spufs: enable SPE problem state MMIO access. · 6df10a82
      Mark Nutter 提交于
      This patch is layered on top of CONFIG_SPARSEMEM
      and is patterned after direct mapping of LS.
      
      This patch allows mmap() of the following regions:
      "mfc", which represents the area from [0x3000 - 0x3fff];
      "cntl", which represents the area from [0x4000 - 0x4fff];
      "signal1" which begins at offset 0x14000; "signal2" which
      begins at offset 0x1c000.
      
      The signal1 & signal2 files may be mmap()'d by regular user
      processes.  The cntl and mfc file, on the other hand, may
      only be accessed if the owning process has CAP_SYS_RAWIO,
      because they have the potential to confuse the kernel
      with regard to parallel access to the same files with
      regular file operations: the kernel always holds a spinlock
      when accessing registers in these areas to serialize them,
      which can not be guaranteed with user mmaps,
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6df10a82
    • A
      [PATCH] spufs: implement mfc access for PPE-side DMA · a33a7d73
      Arnd Bergmann 提交于
      This patch adds a new file called 'mfc' to each spufs directory.
      The file accepts DMA commands that are a subset of what would
      be legal DMA commands for problem state register access. Upon
      reading the file, a bitmask is returned with the completed
      tag groups set.
      
      The file is meant to be used from an abstraction in libspe
      that is added by a different patch.
      
      From the kernel perspective, this means a process can now
      offload a memory copy from or into an SPE local store
      without having to run code on the SPE itself.
      
      The transfer will only be performed while the SPE is owned
      by one thread that is waiting in the spu_run system call
      and the data will be transferred into that thread's
      address space, independent of which thread started the
      transfer.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a33a7d73
  3. 09 1月, 2006 7 次提交
    • A
      [PATCH] spufs: move spu_run call to its own file · ce8ab854
      Arnd Bergmann 提交于
      The logic for sys_spu_run keeps growing and it does
      not really belong into file.c any more since we
      moved away from using regular file operations to our
      own syscall.
      
      No functional change in here.
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ce8ab854
    • A
      [PATCH] spufs: serialize sys_spu_run per spu · 5ef8224a
      Arnd Bergmann 提交于
      During an earlier cleanup, we lost the serialization
      of multiple spu_run calls performed on the same
      spu_context. In order to get this back, introduce a
      mutex in the spu_context that is held inside of spu_run.
      
      Noticed by Al Viro.
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      5ef8224a
    • A
      [PATCH] spufs: fix mailbox polling · 3a843d7c
      Arnd Bergmann 提交于
      Handling mailbox interrupts was broken in multiple respects,
      the combination of which was hiding the bugs most of the time.
      
      - The ibox interrupt mask was open initially even though there
        are no waiters on a newly created SPU.
      
      - Acknowledging the mailbox interrupt did not work because
        it is level triggered and the mailbox data is never retrieved
        from inside the interrupt handler.
      
      - The interrupt handler delivered interrupts with a disabled
        mask if another interrupt is triggered for the same class
        but a different mask.
      
      - The poll function did not enable the interrupt if it had not
        been enabled, so we might run into the poll timeout if none of
        the other bugs saved us and no signal was delivered.
      
      We probably still have a similar problem with blocking
      read/write on mailbox files, but that will result in extra
      wakeup in the worst case, not in incorrect behaviour.
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3a843d7c
    • A
      [PATCH] spufs: Improved SPU preemptability. · 5110459f
      Arnd Bergmann 提交于
      This patch makes it easier to preempt an SPU context by
      having the scheduler hold ctx->state_sema for much shorter
      periods of time.
      
      As part of this restructuring, the control logic for the "run"
      operation is moved from arch/ppc64/kernel/spu_base.c to
      fs/spufs/file.c.  Of course the base retains "bottom half"
      handlers for class{0,1} irqs.  The new run loop will re-acquire
      an SPU if preempted.
      
      From: Mark Nutter <mnutter@us.ibm.com>
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      5110459f
    • A
      [PATCH] spufs: fix local store page refcounting · d88cfffa
      Arnd Bergmann 提交于
      With the new rules for reserved pages, the spufs now
      needs working page reference counting.
      
      I should probably look into converting to vm_insert_page,
      but for now this patch makes spufs work again.
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d88cfffa
    • A
      [PATCH] spufs: cooperative scheduler support · 8b3d6663
      Arnd Bergmann 提交于
      This adds a scheduler for SPUs to make it possible to use
      more logical SPUs than physical ones are present in the
      system.
      
      Currently, there is no support for preempting a running
      SPU thread, they have to leave the SPU by either triggering
      an event on the SPU that causes it to return to the
      owning thread or by sending a signal to it.
      
      This patch also adds operations that enable accessing an SPU
      in either runnable or saved state. We use an RW semaphore
      to protect the state of the SPU from changing underneath
      us, while we are holding it readable. In order to change
      the state, it is acquired writeable and a context save
      or restore is executed before downgrading the semaphore
      to read-only.
      
      From: Mark Nutter <mnutter@us.ibm.com>,
            Uli Weigand <Ulrich.Weigand@de.ibm.com>
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8b3d6663
    • A
      [PATCH] spufs: The SPU file system, base · 67207b96
      Arnd Bergmann 提交于
      This is the current version of the spu file system, used
      for driving SPEs on the Cell Broadband Engine.
      
      This release is almost identical to the version for the
      2.6.14 kernel posted earlier, which is available as part
      of the Cell BE Linux distribution from
      http://www.bsc.es/projects/deepcomputing/linuxoncell/.
      
      The first patch provides all the interfaces for running
      spu application, but does not have any support for
      debugging SPU tasks or for scheduling. Both these
      functionalities are added in the subsequent patches.
      
      See Documentation/filesystems/spufs.txt on how to use
      spufs.
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      67207b96