Subject: Re: [ppc-dev] Re: Restructuring Efforts

From: Benjamin Herrenschmidt <[email-masked]>
Date: Wed, 17 Feb 1999 18:27:16 +0100

On Wed, Feb 17, 1999, Bill Davidsen <[email-masked]> wrote:

>Well, you can preserve readability if you are willing to put the
>machine types in an enum and make use of "pointer to function
>returning" arrays. So instead of doing something like init_mem() you
>would use (*init_mem[_machine])() instead.

What we are trying to do here is a HAL ;-) 

I like the function pointers idea but I don't like indexing by machines
each time the table is accessed. I beleive we should define a structure
of function pointers for each subsystem (setup, mm, irq, ...) at have
some boot logic fill the kernel static tables with pointers from the
subsystem exported tables. The decision based on the architecure must be
done only once.

Eventually, those tables could be "optimised" so that they are all in the
same page, each table beeing aligned on a cache line boundary.

-- 
           E-Mail: <mailto:[email-masked]>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to [email-masked] ]]