[U-Boot] [PATCH] ppc: transform init_sequence into a function.

Wolfgang Denk wd at denx.de
Tue Dec 7 07:34:49 CET 2010


Dear Joakim Tjernlund,

In message <OF9FF97B1B.1FC2BD05-ONC12577F2.0000D034-C12577F2.0002F125 at transmode.se> you wrote:
>
> > > though the loop is cumbersome and not easy as BDI tends to
> > > flush the cache when it stops so you loose your stack.
> >
> > Does it? On which architecture / processor is this?
> 
> MPC8321 and BDI2000. I have to play games with some internal
> BDI command called SAP. Maybe they have fixed this in later models?

Are you using the latest firmware, i. . 1.31 from October 2009?

> > ...but ugly to read.  And if you really want to introduce this style,
> > it has to be done for all architectures, as I want to see this code to
> > become common across architectures.
> 
> That is the next issue, lets not stray from the path ..

Right, that's the next issue, lets not stray from the path and put
additional road blocks into our way when we already know where we are
heading to.

> > I haven't, lately, that's true, or when I had, I always knew pretty
> > well where I had to expect the issues.  But I've been there before,
> > many, many times.
> 
> And you never found it annoying when you hit these function ptrs?

Actually, no.

In an earlier life I've been programming in Forth for some time, so I
find a list of addresses to process quite natural and efficient.

> Now you are proposing that I instrument the code, much like Scott and his
> print of address idea. This is exactly what I want to avoid as it would
> probably have to be adapted from case to case and there is always the
> case when there is no output and then I am back to square zero again.

Don't you use oneliners in the shell that you just make up as needed
and then throw away, and reinvent when you need them again?

Same here. Adding a printf() or similar to some code under test is
something I do several times a day. Even when running under a
debugger, and even when I'm not executing a list of function pointers.
I see no issue with adding this on a case-by-case base, had-tailored
to the specific problem I'm tracking down.

> The argument that it is uglier alone is not a very good one.
> Image the roles were reversed, I am sure you would dismiss me as
> "less beautiful" is really not an argument alone.

Ugliness was only one of several arguments, and there were several
votes againt yours.

Please consider the case closed.  I already marked the patch as NAKed.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The complexity of software is an essential property, not an  acciden-
tal  one. Hence, descriptions of a software entity that abstract away
its complexity often abstract away its essence.    - Fred Brooks, Jr.


More information about the U-Boot mailing list