Skip to content

Commit

Permalink
[POWERPC] cell: Add spu shutdown method
Browse files Browse the repository at this point in the history
Add a shutdown method to spu_sysdev_class to allow proper spu resource
cleanup on system shutdown.  This is needed to support kexec on the PS3
platform.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Geoff Levand authored and Paul Mackerras committed Jun 28, 2007
1 parent b7abc5c commit 6deac06
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion arch/powerpc/platforms/cell/spu_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,18 @@ void spu_free(struct spu *spu)
}
EXPORT_SYMBOL_GPL(spu_free);

static int spu_shutdown(struct sys_device *sysdev)
{
struct spu *spu = container_of(sysdev, struct spu, sysdev);

spu_free_irqs(spu);
spu_destroy_spu(spu);
return 0;
}

struct sysdev_class spu_sysdev_class = {
set_kset_name("spu")
set_kset_name("spu"),
.shutdown = spu_shutdown,
};

int spu_add_sysdev_attr(struct sysdev_attribute *attr)
Expand Down

0 comments on commit 6deac06

Please sign in to comment.