linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: msokolov@ivan.Harhan.ORG (Michael Sokolov)
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: CONFIG_GENERIC_PPC32
Date: Wed, 10 Apr 2002 23:20:21 +1000 (EST)	[thread overview]
Message-ID: <15540.15381.392984.428785@argo.ozlabs.ibm.com> (raw)
In-Reply-To: <0204062023.AA17004@ivan.Harhan.ORG>


Michael Sokolov writes:

> Some commentary is in order on this cset. I strongly recommend that Paulus,
> people interested in bi_recs enhancements, and people interested in GT-64260
> support check it out and give it a good look.

I have had a quick look...

>  Any number of platforms can be included in the
> configuration. Each is selected with a bool in config.in so the user can
> include only the platform(s) that s/he needs, while distribution makers can
> ship one kernel for the world.

A laudable goal.  I like the idea of having each platform selected
with a bool rather than just having a single choice of platform.
I also agree about the CONFIG_ALL_PPC name but no-one has ever been
able to come up with a better name for the PReP/PMac/CHRP combination.

However, there are some aspects of the way you have done your
CONFIG_GENERIC_PPC32 that I don't like.  In particular I don't like
the list of ifdefs in setup.c.  Whenever that sort of thing appears it
is a sign that we need to rethink how we do things.  The old
drivers/net/Space.c was a classic example, and it was a mistake and it
basically became unmaintainable.  Fortunately we have better ways to
handle that sort of thing these days.  In particular we can use ELF
sections in creative ways to make lists of things without having to
have strings of ifdefs.

In fact, any place where we have lists of things, one per platform or
one per config option, is a place where we are going to potentially
get maintainability problems as the number of platforms we support
grows.  At the moment we can't really avoid that completely in the
Makefiles and config.in files.  We can avoid it in C source and we can
mostly avoid it in header files (but not completely at this stage).
As a guideline, ultimately I want it to be the case that you can add
support for a new board without changing *any* existing source files
in the kernel tree, i.e. just by adding files.  (That means that
anything that lists platforms or config options will need to be
autogenerated.)

The other thing I don't like is the bi_rec changes.  While I like the
idea of passing in device information in bi_recs, I really don't like
the use of binary tags for the various specific pieces of information
that we want to specify for the different devices.  This is ultimately
once again a maintainability concern.  Using an enumeration like that
basically forces us into having a central repository for assigning the
numbers and that is going to get us into problems down the track.

Instead I think that both the names of the pieces of information, and
the values of things like the device type, should be represented as
strings.  Using strings just gives us orders of magnitude more
flexibility and extensibility, and is much more suitable for the sort
of decentralized and distributed development that we do.

Now if we are worried about space then we can get creative about how
the strings are stored in the bi_recs, for instance we could store
each unique string exactly once in a string table and then just use a
16-bit index in each place where we want to refer to a string.  We
could put the string table in a bi_rec of its own, and even gzip it if
necessary.

About the early_serial_init changes - using early_serial_init is nice
when the serial driver is built in, but the problem is that when the
serial driver is a module, we don't get given the opportunity to do
the early_serial_init calls between when the module is loaded and when
it runs rs_init.  Otherwise I would have decreed the use of
early_serial_init some time ago. :)

Regards,
Paul.

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

  parent reply	other threads:[~2002-04-10 13:20 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-06 20:23 CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-06 22:06 ` CONFIG_GENERIC_PPC32 Benjamin Herrenschmidt
2002-04-08 15:48 ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-08 16:03   ` CONFIG_GENERIC_PPC32 Gabriel Paubert
2002-04-08 16:24     ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-08 16:48       ` CONFIG_GENERIC_PPC32 Gabriel Paubert
2002-04-08 17:23         ` CONFIG_GENERIC_PPC32 Matt Porter
2002-04-08 17:37           ` CONFIG_GENERIC_PPC32 Gabriel Paubert
2002-04-08 18:07             ` CONFIG_GENERIC_PPC32 Matt Porter
2002-04-08 18:41               ` CONFIG_GENERIC_PPC32 Gabriel Paubert
2002-04-08 18:18   ` CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-08 18:53     ` CONFIG_GENERIC_PPC32 Matt Porter
2002-04-09 14:59     ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-09 19:52       ` CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-10  8:27         ` CONFIG_GENERIC_PPC32 Geert Uytterhoeven
2002-04-10 15:17           ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-11  3:50             ` CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-11 15:27               ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-10 10:28         ` Bootloader (Re: CONFIG_GENERIC_PPC32) benh
2002-04-10 13:30           ` Dan Malek
2002-04-10 15:16         ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-11  3:46           ` CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-11 15:24             ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-11 16:16               ` CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-11 15:51                 ` CONFIG_GENERIC_PPC32 Mark A. Greer
2002-04-11 16:59                 ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-11 17:25                   ` CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-11 17:42                     ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-11 17:03                 ` The very common kernel, again... (Was: Re: CONFIG_GENERIC_PPC32) Tom Rini
2002-04-11 17:31                   ` The very common kernel, again Michael Sokolov
2002-04-11 17:46                     ` Tom Rini
2002-04-10 19:08         ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-10 13:20 ` Paul Mackerras [this message]
2002-04-10 15:23   ` CONFIG_GENERIC_PPC32 benh
  -- strict thread matches above, loose matches on Subject: below --
2002-04-06 21:39 CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-06 22:52 ` CONFIG_GENERIC_PPC32 Benjamin Herrenschmidt
2002-04-07  8:34   ` CONFIG_GENERIC_PPC32 Geert Uytterhoeven
2002-04-07  9:04     ` CONFIG_GENERIC_PPC32 Benjamin Herrenschmidt
2002-04-09  8:12     ` CONFIG_GENERIC_PPC32 Michael Schmitz
2002-04-06 22:17 CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-06 23:29 ` CONFIG_GENERIC_PPC32 Benjamin Herrenschmidt
2002-04-11  3:08 CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-10 23:42 ` CONFIG_GENERIC_PPC32 Benjamin Herrenschmidt
2002-04-11 17:51 ` CONFIG_GENERIC_PPC32 Mark A. Greer
2002-04-12 12:57 ` CONFIG_GENERIC_PPC32 Paul Mackerras
2002-04-12 11:57   ` CONFIG_GENERIC_PPC32 benh
2002-04-12 19:02   ` CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-15 15:46     ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-15 18:08       ` CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-15 19:54         ` CONFIG_GENERIC_PPC32 Tom Rini
2002-04-11 15:40 CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-11 15:49 ` CONFIG_GENERIC_PPC32 Geert Uytterhoeven
2002-04-11 16:13 ` CONFIG_GENERIC_PPC32 benh
2002-04-11 16:24 CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-11 16:50 ` CONFIG_GENERIC_PPC32 benh
2002-04-11 17:15 CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-11 20:51 CONFIG_GENERIC_PPC32 Michael Sokolov
2002-04-11 19:10 ` CONFIG_GENERIC_PPC32 Mark A. Greer

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=15540.15381.392984.428785@argo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=msokolov@ivan.Harhan.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).