1. 14 2月, 2007 1 次提交
  2. 13 2月, 2007 1 次提交
    • B
      [POWERPC] spufs: Fix bitrot of the SPU mmap facility · 17e0e270
      Benjamin Herrenschmidt 提交于
      It looks like we've had some serious bitrot there mostly due to tracking
      of address_space's of mmap'ed files getting out of sync with the actual
      mmap code. The mfc, mss and psmap were not tracked properly and thus
      not invalidated on context switches (oops !)
      
      I also removed the various file->f_mapping = inode->i_mapping;
      assignments that were done in the other open() routines since that
      is already done for us by __dentry_open.
      
      One improvement we might want to do later is to assign the various
      ctx-> fields at mmap time instead of file open/close time so that we
      don't call unmap_mapping_range() on thing that have not been mmap'ed
      
      Finally, I added some smp_wmb's after assigning the ctx-> fields to make
      sure they are visible to other CPUs. I don't think this is really
      necessary as I suspect locking in the fs layer will make that happen
      anyway but better safe than sorry.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      17e0e270
  3. 04 12月, 2006 1 次提交
  4. 25 10月, 2006 1 次提交
    • J
      [POWERPC] spufs: Add isolated-mode SPE recycling support · 099814bb
      Jeremy Kerr 提交于
      When in isolated mode, SPEs have access to an area of persistent
      storage, which is per-SPE. In order for isolated-mode apps to
      communicate arbitrary data through this storage, we need to ensure that
      isolated physical SPEs can be reused for subsequent applications.
      
      Add a file ("recycle") in a spethread dir to enable isolated-mode
      recycling. By writing to this file, the kernel will reload the
      isolated-mode loader kernel, allowing a new app to be run on the same
      physical SPE.
      
      This requires the spu_acquire_exclusive function to enforce exclusive
      access to the SPE while the loader is initialised.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      099814bb
  5. 05 10月, 2006 1 次提交
    • A
      [POWERPC] spufs: Add infrastructure needed for gang scheduling · 6263203e
      Arnd Bergmann 提交于
      Add the concept of a gang to spufs as a new type of object.
      So far, this has no impact whatsover on scheduling, but makes
      it possible to add that later.
      
      A new type of object in spufs is now a spu_gang. It is created
      with the spu_create system call with the flags argument set
      to SPU_CREATE_GANG (0x2). Inside of a spu_gang, it
      is then possible to create spu_context objects, which until
      now was only possible at the root of spufs.
      
      There is a new member in struct spu_context pointing to
      the spu_gang it belongs to, if any. The spu_gang maintains
      a list of spu_context structures that are its children.
      This information can then be used in the scheduler in the
      future.
      
      There is still a bug that needs to be resolved in this
      basic infrastructure regarding the order in which objects
      are removed. When the spu_gang file descriptor is closed
      before the spu_context descriptors, we leak the dentry
      and inode for the gang. Any ideas how to cleanly solve
      this are appreciated.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6263203e
  6. 29 4月, 2006 1 次提交
  7. 27 3月, 2006 3 次提交
    • D
      [PATCH] spufs: initialize context correctly · ca3e91cb
      Dirk Herrendoerfer 提交于
      the mfc member of a new context was not initialized to zero,
      which potentially leads to wild memory accesses.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ca3e91cb
    • 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
  8. 09 1月, 2006 8 次提交