Subject: Re: Pegasos 2 support patch ...

From: Sven Luther <[email-masked]>
Date: Wed, 30 Jun 2004 10:21:50 +0200

On Wed, Jun 30, 2004 at 10:10:07AM +0200, Geert Uytterhoeven wrote:
> On Wed, 30 Jun 2004, Sven Luther wrote:
> > On Tue, Jun 29, 2004 at 09:57:29PM -0500, Benjamin Herrenschmidt wrote:
> > > > Another solution would be to test before doing the translate call, maybe
> > > > this would be more elegant ?
> > >
> > > Yup, if you know it will be broken, don't bother calling it,
> > > and please, avoid the over-long line :)
> >
> > Ok, this is then the final patch, i hope it is now correct.
>
> > --- kernel-source-2.6.7.orig/arch/ppc/syslib/prom_init.c	2004-06-16 07:20:24.000000000 +0200
> > +++ kernel-source-2.6.7.peg2/arch/ppc/syslib/prom_init.c	2004-06-30 07:51:49.975232432 +0200
> > @@ -850,11 +853,20 @@
> >
> >  	klimit = (char *) (mem - offset);
> >
> > -	/* If we are already running at 0xc0000000, we assume we were
> > -	 * loaded by an OF bootloader which did set a BAT for us.
> > -	 * This breaks OF translate so we force phys to be 0.
> > -	 */
> > -	if (offset == 0) {
> > +	node = call_prom("finddevice", 1, 1, "/");
> > +	rc = call_prom("getprop", 4, 1, node, "model", model, sizeof(model));
> > +	if (rc > 0 && !strncmp (model, "Pegasos", 7)
> > +		&& strncmp (model, "Pegasos2", 8)) {
> > +		/* Pegasos 1 has a broken translate method in the OF,
> > +		 * and furthermore the BATs are mapped 1:1 so the phys
> > +		 * address calculated above is * correct, so let's use
>                                                ^
> Bogus asterisk

Ok, i will remove it thanks.

Friendly,

Sven Luther

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/