提交 6deac066 编写于 作者: G Geoff Levand 提交者: Paul Mackerras

[POWERPC] cell: Add spu shutdown method

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: NArnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: NGeoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 b7abc5c5
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册