Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Gerald Champagne <gerald.champagne@esstech.com>
To: Jun Sun <jsun@mvista.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Ralf Baechle <ralf@oss.sgi.com>,
	"linux-mips@oss.sgi.com" <linux-mips@oss.sgi.com>
Subject: Re: Remove ifdefs from setup_arch()
Date: Fri, 12 Oct 2001 13:13:29 -0500	[thread overview]
Message-ID: <3BC732C9.9080508@esstech.com> (raw)
In-Reply-To: 3BC72BE8.F50C2001@mvista.com

Can you wrap this code into small functions like machine_detect() and
board_setup() and put it all in one place?  That way those of us who
just want a simple system supporting only one board can just replace
those two functions with defines that alias the proper machine_detect
and board_setup fuctions.  Then all of the special elf sections and
function pointers go away.

If it's all in one place like this, then maybe it could be configured
in the config.in file.  I can ifdef it out for boards like mine or other
boards that can't possibly support more than one system in a given binary
image.  config.in could ifdef it in for configurations that could possibly
support more than one configuration in a given binary image.

Gerald


Jun Sun wrote:
> The actual mechanism can vary and be flexible, but here is more detail what I
> had in mind:
> 
> 1. <my>_detect is placed in a special ELF section (mips_mach_detect), using
> similar mechanism as .initcall.init section and __setup() macro.
> 
> 2. in addition to the 3 possible return value, <my>_detect also returns a
> function pointer to <my>_setup.  Once a final candidate is chosen, the machine
> detection code will issue the right <my>_setup call.
> 
> There are probably some other related changes which need to be made, (e.g.,
> prom_init() may be eliminated, etc).
> 
> It seems like I get more and more positive feedbacks on this idea.  We should
> try to implement this in 2.5.
> 
> Jun
> 
> 
> 

  reply	other threads:[~2001-10-12 18:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-03 19:11 Remove ifdefs from setup_arch() Gerald Champagne
2001-10-03 19:29 ` Ralf Baechle
2001-10-03 21:11   ` Jun Sun
2001-10-12 11:52     ` Geert Uytterhoeven
2001-10-12 17:44       ` Jun Sun
2001-10-12 18:13         ` Gerald Champagne [this message]
2001-10-12 21:35           ` Ralf Baechle

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=3BC732C9.9080508@esstech.com \
    --to=gerald.champagne@esstech.com \
    --cc=geert@linux-m68k.org \
    --cc=jsun@mvista.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=ralf@oss.sgi.com \
    /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