PPC64 prom logo
Paul Mackerras
paulus at samba.org
Tue Mar 25 07:28:26 EST 2003
Geert Uytterhoeven writes:
> On Mon, 24 Mar 2003, James Simmons wrote:
> > > --- linux-2.5.x/arch/ppc64/kernel/prom.c.orig Sun Mar 23 11:37:52 2003
> > > +++ linux-2.5.x/arch/ppc64/kernel/prom.c Sun Mar 23 11:39:35 2003
> > > @@ -1271,7 +1271,8 @@
> > >
> > > #ifdef CONFIG_FB_LOGO_LINUX_CLUT224
> > > clut = RELOC(RELOC(&logo_linux_clut224)->clut);
> > > - for (i = 0; i < logo_linux_clut224.clutsize; i++, clut += 3)
> > > + for (i = 0; i < RELOC(&logo_linux_clut224)->clutsize;
> > > + i++, clut += 3)
> > > if (prom_set_color(ih, i + 32, clut[0], clut[1],
> > > clut[2]) != 0)
> > > break;
> > >
> >
> > Shoudln't that be clut = RELOC(&logo_linux_clut2 instead?
>
> I don't think so. First the logo_linux_clut224 symbol has to be relocated,
> followed by the pointer to the CLUT.
Actually, you should use RELOC on a variable (an L-value) or PTRRELOC
on a value (an R-value), so it should look like this:
clut = PTRRELOC(RELOC(logo_linux_clut224.clut));
for (i = 0; i < RELOC(logo_linux_clut224.clutsize); i++, clut += 3)
etc. I'll test on an actual ppc64 box and send a tested patch.
Paul.
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list