Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67353
b: refs/heads/master
c: 48cad41
h: refs/heads/master
i:
  67351: c1a8350
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Sep 19, 2007
1 parent 73b84e8 commit 469c765
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 109 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78810ff6723f20015373b1ba8dd981f24c62f680
refs/heads/master: 48cad41f7ee7b8a9a8317a4abbdaf09bc68b4773
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/cell/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spu-manage-$(CONFIG_PPC_CELLEB) += spu_manage.o
spu-manage-$(CONFIG_PPC_CELL_NATIVE) += spu_manage.o

obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
spu_coredump.o spu_syscalls.o \
spu_syscalls.o \
$(spu-priv1-y) \
$(spu-manage-y) \
spufs/
Expand Down
83 changes: 0 additions & 83 deletions trunk/arch/powerpc/platforms/cell/spu_coredump.c

This file was deleted.

30 changes: 30 additions & 0 deletions trunk/arch/powerpc/platforms/cell/spu_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* SPU file system -- system call stubs
*
* (C) Copyright IBM Deutschland Entwicklung GmbH 2005
* (C) Copyright 2006-2007, IBM Corporation
*
* Author: Arnd Bergmann <arndb@de.ibm.com>
*
Expand Down Expand Up @@ -111,6 +112,35 @@ asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, __u32 __user *ustatus)
return ret;
}

int arch_notes_size(void)
{
struct spufs_calls *calls;
int ret;

calls = spufs_calls_get();
if (!calls)
return 0;

ret = calls->coredump_extra_notes_size();

spufs_calls_put(calls);

return ret;
}

void arch_write_notes(struct file *file)
{
struct spufs_calls *calls;

calls = spufs_calls_get();
if (!calls)
return;

calls->coredump_extra_notes_write(file);

spufs_calls_put(calls);
}

int register_spu_syscalls(struct spufs_calls *calls)
{
if (spufs_calls)
Expand Down
10 changes: 2 additions & 8 deletions trunk/arch/powerpc/platforms/cell/spufs/coredump.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static struct spu_context *coredump_next_context(int *fd)
return ctx;
}

static int spufs_arch_notes_size(void)
int spufs_coredump_extra_notes_size(void)
{
struct spu_context *ctx;
int size = 0, rc, fd;
Expand Down Expand Up @@ -185,7 +185,7 @@ static void spufs_arch_write_note(struct spu_context *ctx, int i,
free_page((unsigned long)buf);
}

static void spufs_arch_write_notes(struct file *file)
void spufs_coredump_extra_notes_write(struct file *file)
{
struct spu_context *ctx;
int fd, j;
Expand All @@ -200,9 +200,3 @@ static void spufs_arch_write_notes(struct file *file)
spu_release_saved(ctx);
}
}

struct spu_coredump_calls spufs_coredump_calls = {
.arch_notes_size = spufs_arch_notes_size,
.arch_write_notes = spufs_arch_write_notes,
.owner = THIS_MODULE,
};
6 changes: 0 additions & 6 deletions trunk/arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,16 +790,11 @@ static int __init spufs_init(void)
ret = register_spu_syscalls(&spufs_calls);
if (ret)
goto out_fs;
ret = register_arch_coredump_calls(&spufs_coredump_calls);
if (ret)
goto out_syscalls;

spufs_init_isolated_loader();

return 0;

out_syscalls:
unregister_spu_syscalls(&spufs_calls);
out_fs:
unregister_filesystem(&spufs_type);
out_sched:
Expand All @@ -815,7 +810,6 @@ static void __exit spufs_exit(void)
{
spu_sched_exit();
spufs_exit_isolated_loader();
unregister_arch_coredump_calls(&spufs_coredump_calls);
unregister_spu_syscalls(&spufs_calls);
unregister_filesystem(&spufs_type);
kmem_cache_destroy(spufs_inode_cache);
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/platforms/cell/spufs/spufs.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ extern struct spufs_calls spufs_calls;
long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *status);
long spufs_create(struct nameidata *nd, unsigned int flags,
mode_t mode, struct file *filp);
/* ELF coredump callbacks for writing SPU ELF notes */
extern int spufs_coredump_extra_notes_size(void);
extern void spufs_coredump_extra_notes_write(struct file *file);

extern const struct file_operations spufs_context_fops;

/* gang management */
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/platforms/cell/spufs/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,7 @@ static long do_spu_create(const char __user *pathname, unsigned int flags,
struct spufs_calls spufs_calls = {
.create_thread = do_spu_create,
.spu_run = do_spu_run,
.coredump_extra_notes_size = spufs_coredump_extra_notes_size,
.coredump_extra_notes_write = spufs_coredump_extra_notes_write,
.owner = THIS_MODULE,
};
12 changes: 2 additions & 10 deletions trunk/include/asm-powerpc/spu.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,8 @@ struct spufs_calls {
struct file *neighbor);
long (*spu_run)(struct file *filp, __u32 __user *unpc,
__u32 __user *ustatus);
struct module *owner;
};

/* coredump calls implemented in spufs */
struct spu_coredump_calls {
asmlinkage int (*arch_notes_size)(void);
asmlinkage void (*arch_write_notes)(struct file *file);
int (*coredump_extra_notes_size)(void);
void (*coredump_extra_notes_write)(struct file *file);
struct module *owner;
};

Expand All @@ -277,9 +272,6 @@ struct spu_coredump_calls {
int register_spu_syscalls(struct spufs_calls *calls);
void unregister_spu_syscalls(struct spufs_calls *calls);

int register_arch_coredump_calls(struct spu_coredump_calls *calls);
void unregister_arch_coredump_calls(struct spu_coredump_calls *calls);

int spu_add_sysdev_attr(struct sysdev_attribute *attr);
void spu_remove_sysdev_attr(struct sysdev_attribute *attr);

Expand Down

0 comments on commit 469c765

Please sign in to comment.