1. 14 2月, 2007 2 次提交
  2. 13 2月, 2007 3 次提交
  3. 04 12月, 2006 10 次提交
  4. 25 10月, 2006 3 次提交
  5. 16 10月, 2006 1 次提交
  6. 05 10月, 2006 5 次提交
    • A
      [POWERPC] spufs: add infrastructure for finding elf objects · 86767277
      Arnd Bergmann 提交于
      This adds an 'object-id' file that the spe library can
      use to store a pointer to its ELF object. This was
      originally meant for use by oprofile, but is now
      also used by the GNU debugger, if available.
      
      In order for oprofile to find the location in an spu-elf
      binary where an event counter triggered, we need a way
      to identify the binary in the first place.
      
      Unfortunately, that binary itself can be embedded in a
      powerpc ELF binary. Since we can assume it is mapped into
      the effective address space of the running process,
      have that one write the pointer value into a new spufs
      file.
      
      When a context switch occurs, pass the user value to
      the profiler so that can look at the mapped file (with
      some care).
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      86767277
    • A
      [POWERPC] spufs: add support for read/write on cntl · e1dbff2b
      Arnd Bergmann 提交于
      Writing to cntl can be used to stop execution on the
      spu and to restart it, reading from cntl gives the
      contents of the current status register.
      
      The access is always in ascii, as for most other files.
      
      This was always meant to be there, but we had a little
      problem with writing to runctl so it was left out so
      far.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e1dbff2b
    • A
      [POWERPC] spufs: make mailbox functions handle multiple elements · cdcc89bb
      Arnd Bergmann 提交于
      Since libspe2 will provide a function that can read/write
      multiple mailbox elements at once, the kernel should handle
      that efficiently.
      
      read/write on the three mailbox files can now access the
      spe context multiple times to operate on any number of
      mailbox data elements.
      
      If the spu application keeps writing to its outbound
      mailbox, the read call will pick up all the data in a
      single system call.
      
      Unfortunately, if the user passes an invalid pointer,
      we may lose a mailbox element on read, since we can't
      put it back. This probably impossible to solve, if the
      user also accesses the mailbox through direct register
      access.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      cdcc89bb
    • A
      [POWERPC] spufs: use correct pg_prot for mapping SPU local store · ac91cb8d
      Arnd Bergmann 提交于
      This hopefully fixes a long-standing bug in the spu file system.
      An spu context comes with local memory that can be either saved
      in kernel pages or point directly to a physical SPE.
      
      When mapping the physical SPE, that mapping needs to be cache-inhibited.
      For simplicity, we used to map the kernel backing memory that way
      too, but unfortunately that was not only inefficient, but also incorrect
      because the same page could then be accessed simultaneously through
      a cacheable and a cache-inhibited mapping, which is not allowed
      by the powerpc specification and in our case caused data inconsistency
      for which we did a really ugly workaround in user space.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ac91cb8d
    • B
      [POWERPC] spufs: cell spu problem state mapping updates · 27d5bf2a
      Benjamin Herrenschmidt 提交于
      This patch adds a new "psmap" file to spufs that allows mmap of all of
      the problem state mapping of SPEs. It is compatible with 64k pages. In
      addition, it removes mmap ability of individual files when using 64k
      pages, with the exception of signal1 and signal2 which will both map the
      entire 64k page holding both registers. It also removes
      CONFIG_SPUFS_MMAP as there is no point in not building mmap support in
      spufs.
      
      It goes along a separate patch to libspe implementing usage of that new
      file to access problem state registers.
      
      Another patch will follow up to fix races opened up by accessing
      the 'runcntl' register directly, which is made possible with this
      patch.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      27d5bf2a
  7. 26 9月, 2006 1 次提交
  8. 28 6月, 2006 1 次提交
  9. 26 6月, 2006 1 次提交
  10. 21 6月, 2006 2 次提交
  11. 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
  12. 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