aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/inode.c
diff options
context:
space:
mode:
authorDwayne Grant McConnell <decimal@us.ibm.com>2006-11-22 18:46:37 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-04 04:40:19 -0500
commitbf1ab978be2318c5a564de9aa0f1a217b44170d4 (patch)
tree518a971f12a65c8a3ee54d75b6a8c33b68f54664 /arch/powerpc/platforms/cell/spufs/inode.c
parent9309180f11f0107c9858a61a1ac2b04518a91080 (diff)
[POWERPC] coredump: Add SPU elf notes to coredump.
This patch adds SPU elf notes to the coredump. It creates a separate note for each of /regs, /fpcr, /lslr, /decr, /decr_status, /mem, /signal1, /signal1_type, /signal2, /signal2_type, /event_mask, /event_status, /mbox_info, /ibox_info, /wbox_info, /dma_info, /proxydma_info, /object-id. A new macro, ARCH_HAVE_EXTRA_NOTES, was created for architectures to specify they have extra elf core notes. A new macro, ELF_CORE_EXTRA_NOTES_SIZE, was created so the size of the additional notes could be calculated and added to the notes phdr entry. A new macro, ELF_CORE_WRITE_EXTRA_NOTES, was created so the new notes would be written after the existing notes. The SPU coredump code resides in spufs. Stub functions are provided in the kernel which are hooked into the spufs code which does the actual work via register_arch_coredump_calls(). A new set of __spufs_<file>_read/get() functions was provided to allow the coredump code to read from the spufs files without having to lock the SPU context for each file read from. Cc: <linux-arch@vger.kernel.org> Signed-off-by: Dwayne Grant McConnell <decimal@us.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/inode.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index d5f0a21a19d..a3ca06bd0ca 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -232,6 +232,7 @@ struct file_operations spufs_context_fops = {
232 .readdir = dcache_readdir, 232 .readdir = dcache_readdir,
233 .fsync = simple_sync_file, 233 .fsync = simple_sync_file,
234}; 234};
235EXPORT_SYMBOL_GPL(spufs_context_fops);
235 236
236static int 237static int
237spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags, 238spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,
@@ -647,6 +648,7 @@ static struct file_system_type spufs_type = {
647static int __init spufs_init(void) 648static int __init spufs_init(void)
648{ 649{
649 int ret; 650 int ret;
651
650 ret = -ENOMEM; 652 ret = -ENOMEM;
651 spufs_inode_cache = kmem_cache_create("spufs_inode_cache", 653 spufs_inode_cache = kmem_cache_create("spufs_inode_cache",
652 sizeof(struct spufs_inode_info), 0, 654 sizeof(struct spufs_inode_info), 0,
@@ -664,8 +666,12 @@ static int __init spufs_init(void)
664 ret = register_spu_syscalls(&spufs_calls); 666 ret = register_spu_syscalls(&spufs_calls);
665 if (ret) 667 if (ret)
666 goto out_fs; 668 goto out_fs;
669 ret = register_arch_coredump_calls(&spufs_coredump_calls);
670 if (ret)
671 goto out_fs;
667 672
668 spufs_init_isolated_loader(); 673 spufs_init_isolated_loader();
674
669 return 0; 675 return 0;
670out_fs: 676out_fs:
671 unregister_filesystem(&spufs_type); 677 unregister_filesystem(&spufs_type);
@@ -679,6 +685,7 @@ module_init(spufs_init);
679static void __exit spufs_exit(void) 685static void __exit spufs_exit(void)
680{ 686{
681 spu_sched_exit(); 687 spu_sched_exit();
688 unregister_arch_coredump_calls(&spufs_coredump_calls);
682 unregister_spu_syscalls(&spufs_calls); 689 unregister_spu_syscalls(&spufs_calls);
683 unregister_filesystem(&spufs_type); 690 unregister_filesystem(&spufs_type);
684 kmem_cache_destroy(spufs_inode_cache); 691 kmem_cache_destroy(spufs_inode_cache);