[patch 01/18] Cell: Add spu shutdown method

Michael Ellerman michael at ellerman.id.au
Wed Jun 6 14:08:34 EST 2007


On Tue, 2007-06-05 at 19:59 -0700, Geoff Levand wrote:
> 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 at de.ibm.com>
> Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>
> ---
>  arch/powerpc/platforms/cell/spu_base.c |   12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)

André, does this interact with your kexec work at all?

cheers

> --- a/arch/powerpc/platforms/cell/spu_base.c
> +++ b/arch/powerpc/platforms/cell/spu_base.c
> @@ -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)
> 
-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070606/e3857146/attachment.pgp>


More information about the Linuxppc-dev mailing list