linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Dan Malek <dan@embeddedalley.com>
Cc: linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH] powerpc: consolidate mpc83xx platform files
Date: Tue, 19 Dec 2006 08:22:40 +1100	[thread overview]
Message-ID: <1166476960.19254.14.camel@localhost.localdomain> (raw)
In-Reply-To: <58E9B419-8FFE-4191-B384-A2F7C22BCAFA@embeddedalley.com>

On Fri, 2006-12-15 at 12:23 -0500, Dan Malek wrote:
> On Dec 15, 2006, at 11:09 AM, Kumar Gala wrote:
> 
> >
> >> +	if (machine_is(mpc83xx))
> >> +		of_platform_bus_probe(NULL, NULL, NULL);
> >> +
> >
> > Does this every get called, meaning does anything match machine_is
> > (mpc83xx)?
> 
> 
> I truly dislike this "machine_is" method.  Other architectures
> do this and it becomes a real PITA.  It seems to evolve
> into something that never has the proper, useful granularity.
> Surprisingly, it often ends up as a guarantee you can't boot
> common kernels on similar boards, which is what
> I suspect you are trying to achieve.

Well, machine_is(mpc83xx) is certainly wrong, it should be
machine_is(whatver_my_board_name_is). It's a way to test for a given bsp
and nothing else. It's served us well for powermac/prep/chrp though I
agree that abusing it is often a sign that something is wrong with the
design.

There is one area on which is needs right now is when a platform adds
initcalls as those will be called regardless of wether that platform was
actually selected at boot or not, though I've been thinking about a way
to add board_xxx_initcall() thingies to fix that. 

In general, for better granularity, code shall test specific properties
in the device-tree exposing a given feature.

> This is a case where your board specific initialization
> should call this, or fill in a ppc_md indirect pointer that
> if set is called at the proper time.

Agreed.

Ben.

  reply	other threads:[~2006-12-18 21:22 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-14  1:04 [PATCH] powerpc: consolidate mpc83xx platform files Kim Phillips
2006-12-15 16:09 ` Kumar Gala
2006-12-15 17:23   ` Dan Malek
2006-12-18 21:22     ` Benjamin Herrenschmidt [this message]
2006-12-15 17:59   ` Olof Johansson
2006-12-16  1:31     ` Stephen Rothwell
2006-12-18 21:23     ` Benjamin Herrenschmidt
2006-12-18 21:19   ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2006-12-19 21:30 Kim Phillips
2006-12-19 22:19 ` Ben Warren
2006-12-18 14:44 Joakim Tjernlund
2006-12-18 16:51 ` Olof Johansson
2006-12-12 17:36 Kim Phillips
2006-12-12 18:03 ` Kumar Gala
2006-12-09  1:07 Kim Phillips
2006-12-09  7:14 ` Benjamin Herrenschmidt
2006-12-11  3:41   ` Kumar Gala
2006-12-11 21:51     ` Kim Phillips
2006-12-11 22:08       ` Kumar Gala
2006-12-12  2:10         ` Kim Phillips
2006-12-12  2:29           ` Benjamin Herrenschmidt
2006-12-12  2:31             ` Kumar Gala
2006-12-12 21:30             ` Scott Wood
2006-12-12 21:47               ` Benjamin Herrenschmidt
2006-12-12 22:06                 ` Kumar Gala
2006-12-12 22:24                   ` Kim Phillips
2006-12-12 22:28                     ` Kumar Gala
2006-12-12 22:38                       ` Kim Phillips
2006-12-12 22:44                         ` Benjamin Herrenschmidt
2006-12-12 22:51                           ` Kim Phillips
2006-12-12 22:40                       ` Scott Wood
2006-12-13  0:23                         ` Kumar Gala
2006-12-13  5:25                           ` Geoff Thorpe
2006-12-13  6:07                             ` Kumar Gala
2006-12-13 17:48                               ` Geoff Thorpe
2006-12-13 18:21                               ` Kim Phillips
2006-12-13 21:13                               ` Dan Malek
2006-12-12 22:03               ` Kumar Gala
2006-12-12 22:41                 ` Scott Wood
2006-12-12 22:46                   ` Benjamin Herrenschmidt
2006-12-13  0:20                   ` Kumar Gala
2006-12-18  5:17       ` Paul Mackerras
2006-12-18 17:04         ` Kumar Gala

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=1166476960.19254.14.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=dan@embeddedalley.com \
    --cc=linuxppc-dev@ozlabs.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).