1. 04 Jan, 2012 1 commit
  2. 28 Dec, 2007 1 commit
  3. 19 Sep, 2007 4 commits
    • Michael Ellerman's avatar
      [POWERPC] spufs: Handle errors in SPU coredump code, and support coredump to a pipe · 7af1443a
      Michael Ellerman authored
      
      
      Rework spufs_coredump_extra_notes_write() to check for and return errors.
      
      If we're coredumping to a pipe we can't trust file->f_pos, we need to
      maintain the foffset value passed to us. The cleanest way to do this is
      to have the low level write routine increment foffset when we've
      successfully written.
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      7af1443a
    • Michael Ellerman's avatar
      [POWERPC] spufs: Cleanup ELF coredump extra notes logic · e5501492
      Michael Ellerman authored
      
      
      To start with, arch_notes_size() etc. is a little too ambiguous a name for
      my liking, so change the function names to be more explicit.
      
      Calling through macros is ugly, especially with hidden parameters, so don't
      do that, call the routines directly.
      
      Use ARCH_HAVE_EXTRA_ELF_NOTES as the only flag, and based on it decide
      whether we want the extern declarations or the empty versions.
      
      Since we have empty routines, actually use them in the coredump code to
      save a few #ifdefs.
      
      We want to change the handling of foffset so that the write routine updates
      foffset as it goes, instead of using file->f_pos (so that writing to a pipe
      works).  So pass foffset to the write routine, and for now just set it to
      file->f_pos at the end of writing.
      
      It should also be possible for the write routine to fail, so change it to
      return int and treat a non-zero return as failure.
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      e5501492
    • Michael Ellerman's avatar
      [POWERPC] spufs: Combine spufs_coredump_calls with spufs_calls · 48cad41f
      Michael Ellerman authored
      
      
      Because spufs might be built as a module, we can't have other parts of the
      kernel calling directly into it, we need stub routines that check first if the
      module is loaded.
      
      Currently we have two structures which hold callbacks for these stubs, the
      syscalls are in spufs_calls and the coredump calls are in spufs_coredump_calls.
      In both cases the logic for registering/unregistering is essentially the same,
      so we can simplify things by combining the two.
      Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
      Acked-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      48cad41f
    • Jeremy Kerr's avatar
      [POWERPC] cell: Unify spufs syscall path · 98f06978
      Jeremy Kerr authored
      
      
      At present, a built-in spufs will not use the spufs_calls callbacks, but
      directly call sys_spu_create.  This saves us an indirect branch, but
      means we have duplicated functions - one for CONFIG_SPU_FS=y and one for
      =m.
      
      This change unifies the spufs syscall path, and provides access to the
      spufs_calls structure through a get/put pair.  At present, the only user
      of the spufs_calls structure is spu_syscalls.c, but this will facilitate
      adding the coredump calls later.
      
      Everyone likes numbers, right?  Here's a before/after comparison with
      CONFIG_SPU_FS=y, doing spu_create(); close(); 64k times.
      
      Before:
      	[jk@cell ~]$ time ./spu_create
      	performing 65536 spu_create calls
      
      	real    0m24.075s
      	user    0m0.146s
      	sys     0m23.925s
      
      After:
      	[jk@cell ~]$ time ./spu_create
      	performing 65536 spu_create calls
      
      	real    0m24.777s
      	user    0m0.141s
      	sys     0m24.631s
      
      So, we're adding around 11us per syscall, at the benefit of having
      only one syscall path.
      Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      98f06978
  4. 15 Aug, 2007 1 commit
  5. 20 Jul, 2007 1 commit
  6. 09 Jan, 2006 3 commits