linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Dan Malek <dan@embeddedalley.com>
Cc: Olof Johansson <olof@lixom.net>, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 10/11] Add MPC8360EMDS board support
Date: Wed, 4 Oct 2006 10:40:33 +1000	[thread overview]
Message-ID: <17699.769.632098.479906@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <EBD0615C-4F22-430F-BD23-1283DF98F1B3@embeddedalley.com>

Dan Malek writes:

> > ....   So you can boot the same kernel binary on
> > several boards, as long as the drivers are built in and the correct
> > device tree is used. Has everyone missed/forgotten that objective
> > completely?
> 
> That was never an objective when we started, although
> it seems some people involved in the implementation
> think it's the only objective.  It just happens to be a side
> effect when convenient.

I tend to look at it not as a direct objective in itself for the
embedded platforms, but more as something that will just happen
naturally when the code is written well.

I also don't think it's the role of the upstream kernel sources to
support every single embedded board out there.  I think stuff should
be upstream if it is either (a) useful to a lot of people as-is, or
(b) useful as a starting point for making a kernel that will work on a
specific board.

Most of the embedded stuff falls into category (b), which means that
it needs to be understandable and reusable, rather than being
specifically optimized for a particular board.  That means that ifdefs
are evil, because they obfuscate the code.  Also, ifdefs are often a
sign that a driver is only written to support one instance of a
particular device, which is a limitation on its reusability - it will
have to be modified when someone makes a chip or board that has two of
its device on it.

I have no problem whatever with someone taking the upstream sources
and optimizing it to the nth degree for their particular embedded
board.  I don't think that's appropriate for the upstream sources
though.

The device-tree concept offers a way to make drivers more readable and
reusable, by separating out the board-specific configuration
information (thus reducing ifdefs) and by encouraging the style of
code that naturally copes with any number of device instances.

> Now, we have something that is way more complex than
> we initially thought was necessary, trying to describe nearly
> everything addressable in the system instead of just the
> internal memory map.  I suspect the software to attain

How does the "internal memory map" differ from "everything addressable
in the system"?  I think it is useful if the device tree describes the
non-discoverable devices in the system; we have never said the device
tree has to contain devices that the kernel can discover for itself,
such as PCI devices.

> Highly configurable development/evaluation
> boards running a single binary aren't high volume
> products, and the additional resources required
> by such software could ensure real products aren't
> developed with PPCs.  We need to be sensitive
> to this.

Leo Li had an interesting idea, which is a preprocessor that would
take kernel code written to use the device tree, plus the specific
device tree for a board, and emit a version of the code with
everything hard-coded.  That would assist with getting the
uber-optimized version that you want for a product.

Paul.

  parent reply	other threads:[~2006-10-04  0:40 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-21 12:20 [PATCH 10/11] Add MPC8360EMDS board support Li Yang
2006-09-27  6:39 ` Paul Mackerras
2006-09-27 11:56   ` Vitaly Bordug
2006-09-27 12:02     ` Li Yang-r58472
2006-09-27 12:55       ` Vitaly Bordug
2006-09-27 13:09         ` Ben Warren
2006-09-27 13:20         ` Li Yang-r58472
2006-09-27 13:33           ` Kumar Gala
2006-09-28  6:12             ` Li Yang-r58472
2006-09-30  0:49             ` Paul Mackerras
2006-09-27 14:14           ` Jon Loeliger
2006-09-28  6:38             ` Li Yang-r58472
2006-09-27 14:42         ` Dan Malek
2006-09-27 16:22           ` Olof Johansson
2006-09-28  4:10             ` Dan Malek
2006-09-30 15:56               ` Li Yang
2006-10-04  0:40               ` Paul Mackerras [this message]
2006-10-04 13:53                 ` Dan Malek
2006-10-04 17:28                   ` Tim Bird
2006-10-05  0:27                   ` Paul Mackerras
2006-10-05  6:29                     ` Eugene Surovegin
2006-10-04  6:08               ` Benjamin Herrenschmidt
2006-10-04 14:48                 ` Dan Malek
2006-10-04 23:36                   ` Benjamin Herrenschmidt
2006-10-05  0:03                     ` Paul Mackerras
2006-10-05  0:08                       ` Benjamin Herrenschmidt
2006-10-05  0:16                       ` Vitaly Bordug
2006-10-05  6:21                     ` Eugene Surovegin
2006-10-05  6:26                       ` Benjamin Herrenschmidt
2006-10-05  6:31                         ` Eugene Surovegin
2006-10-05  6:33                         ` Eugene Surovegin
2006-10-05  6:51                           ` Benjamin Herrenschmidt
2006-10-04  5:52           ` Benjamin Herrenschmidt
2006-10-04 14:57             ` Dan Malek
2006-10-04 16:05               ` Jerry Van Baren
2006-09-27 14:57         ` Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2006-09-27 13:54 Joakim Tjernlund

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=17699.769.632098.479906@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=dan@embeddedalley.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=olof@lixom.net \
    /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).