linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [Cbe-oss-dev] [PATCH] cell: abstract spu management routines
Date: Wed, 08 Nov 2006 16:01:14 +1100	[thread overview]
Message-ID: <1162962074.20271.16.camel@localhost.localdomain> (raw)
In-Reply-To: <455161D2.3090004@am.sony.com>

[-- Attachment #1: Type: text/plain, Size: 2354 bytes --]

On Tue, 2006-11-07 at 20:49 -0800, Geoff Levand wrote:
> This adds a platform specific spu management abstraction and the corresponding
> routines to support the IBM Cell Blade.  It also removes the hypervisor only
> resources that were included in struct spu.
> 
> Three new platform specific routines are introduced, spu_enumerate_spus(),
> spu_create_spu() and spu_destroy_spu().  The underlining design uses a new
> type, struct spu_management_ops, to hold function pointers that the platform
> setup code is expected to initialize to instances appropriate to that platform.
> 
> For the IBM Cell Blade support, I put the hypervisor only resources that were
> in struct spu into a platform specific data structure struct platform_data.
> 
> 
> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
> 
> ---
..
> Index: cell--common--6/arch/powerpc/platforms/cell/spu_priv1_mmio.c
> ===================================================================
> --- cell--common--6.orig/arch/powerpc/platforms/cell/spu_priv1_mmio.c
> +++ cell--common--6/arch/powerpc/platforms/cell/spu_priv1_mmio.c
> @@ -18,120 +18,467 @@
>   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
>   */
>  
> +#undef DEBUG
> +
> +#include <linux/interrupt.h>
> +#include <linux/list.h>
>  #include <linux/module.h>
> +#include <linux/ptrace.h>
> +#include <linux/slab.h>
> +#include <linux/wait.h>
> +#include <linux/mm.h>
> +#include <linux/io.h>
> +#include <linux/mutex.h>
> +#include <linux/device.h>
>  
> -#include <asm/io.h>
>  #include <asm/spu.h>
>  #include <asm/spu_priv1.h>
> +#include <asm/firmware.h>
> +#include <asm/prom.h>
>  
>  #include "interrupt.h"
>  
> +struct platform_data {
> +	int nid;
> +	struct device_node *devnode;
> +	struct spu_priv1 __iomem *priv1;
> +};
> +
> +static struct platform_data *platform_data(struct spu *spu)
> +{
> +	BUG_ON(!spu->platform_data);
> +	return (struct platform_data*)spu->platform_data;
> +}

I don't see the point of this, why not just grab platform data directly?

cheers

-- 
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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-11-08  5:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-08  4:49 [PATCH] cell: abstract spu management routines Geoff Levand
2006-11-08  5:01 ` Michael Ellerman [this message]
2006-11-08  5:24   ` [Cbe-oss-dev] " Geoff Levand
2006-11-08  5:54     ` Michael Ellerman
2006-11-08  6:03       ` Geoff Levand
2006-11-08  6:06         ` Michael Ellerman
2006-11-08  6:28         ` Stephen Rothwell
2006-11-08  6:28     ` Michael Ellerman
2006-11-08  5:35   ` Benjamin Herrenschmidt
2006-11-08  5:31 ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1162962074.20271.16.camel@localhost.localdomain \
    --to=michael@ellerman.id.au \
    --cc=arnd@arndb.de \
    --cc=cbe-oss-dev@ozlabs.org \
    --cc=geoffrey.levand@am.sony.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).