All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] initcall mechanism introduction
Date: Tue, 26 May 2009 17:20:56 -0500	[thread overview]
Message-ID: <4A1C6B48.9050106@freescale.com> (raw)
In-Reply-To: <20090526215455.5BB0C832E416@gemini.denx.de>

Wolfgang Denk wrote:
> Dear Scott,
> 
> in message <20090526210046.GA4669@b07421-ec1.am.freescale.net> you wrote:
>> IMHO, it is much better for the information on what needs to be run on
>> init to reside in the file that needs to be called, rather than copied to
>> a bunch of different arch files.
> 
> Then you might end up with another maze of #ifdef's...

Only when you have a situation like the BAB7xx/CPC45 (in which case you 
could ifdef the priority -- or just ifndef the initcall for those boards 
and handle that special case manually).  You wouldn't have ifdefs for 
just the presence of the thing that needs to be initialized, and it 
would be only in one place rather than X arch files.

>> component X is always supposed to come before component Y, that can be
>> done with different levels of initcalls, or just by arranging the
>> makefiles appropriately (with a comment warning people not to change it).
> 
> The problem is that there is no such fix order. It is board dependent.

There will be exceptions, but for many things there's just no reason for 
the board to care (such as the time at which we run relocation fixups or 
other data structure initialization for things in common/).  One 
shouldn't have to change a bunch of arch files in order to add some new 
common code that needs init.

>> This has nothing to do with memory management.
> 
> But saving memory was one of j24's arguments?

I assume he meant that the image size was smaller, due to replacing 
explicit function calls with a table-driven approach.

-Scott

  parent reply	other threads:[~2009-05-26 22:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-23 15:05 [U-Boot] [RFC] initcall mechanism introduction Jean-Christophe PLAGNIOL-VILLARD
     [not found] ` <1243091325-27683-1-git-send-email-plagnioj@jcrosoft.com>
2009-05-23 15:08   ` [U-Boot] [PATCH 2/3] arm: add initcalls_init Jean-Christophe PLAGNIOL-VILLARD
2009-05-23 15:08     ` [U-Boot] [PATCH 3/3] net: switch device init to initcall Jean-Christophe PLAGNIOL-VILLARD
2009-05-23 15:41       ` Ben Warren
2009-05-23 16:36         ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-23 18:26           ` Wolfgang Denk
2009-05-23 18:31           ` Ben Warren
2009-05-23 18:19 ` [U-Boot] [RFC] initcall mechanism introduction Wolfgang Denk
2009-05-24 12:00   ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-24 14:57     ` Wolfgang Denk
2009-05-24 15:04       ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-24 17:05         ` Wolfgang Denk
2009-05-26 21:00       ` Scott Wood
2009-05-26 21:54         ` Wolfgang Denk
2009-05-26 22:07           ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-26 22:25             ` Wolfgang Denk
2009-05-26 22:20           ` Scott Wood [this message]
2009-05-26 22:28             ` Wolfgang Denk
2009-05-27  7:52           ` Haavard Skinnemoen
2009-05-27  8:12             ` Stefan Roese
2009-05-27 18:48               ` Mike Frysinger

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=4A1C6B48.9050106@freescale.com \
    --to=scottwood@freescale.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.