linux-mips
[Top] [All Lists]

Re: Remove ifdefs from setup_arch()

To: Jun Sun <jsun@mvista.com>
Subject: Re: Remove ifdefs from setup_arch()
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Fri, 12 Oct 2001 13:52:19 +0200 (MEST)
Cc: Ralf Baechle <ralf@oss.sgi.com>, Gerald Champagne <gerald.champagne@esstech.com>, "linux-mips@oss.sgi.com" <linux-mips@oss.sgi.com>
In-reply-to: <3BBB7F14.C864736A@mvista.com>
Sender: owner-linux-mips@oss.sgi.com
On Wed, 3 Oct 2001, Jun Sun wrote:
> I talked about machine detection a while back.  My idea is following:
> 
> 0. all machines that are *configured* into the image will supply <my>_detect()
> and <my>_setup() functions.
> 
> 1. at MIPS start up, we loop through all <my>_detect(), which returns three
> values, a) run-time detection negative, b) run-time detection positive, and c)
> no run-time detection code, but I return positive because I am configured in.
> 
> 2. the startup code resolves conflicts (which sometimes may panic); and decide
> on one machine.
> 
> 3. then the startup code calls the right <my>_setup() code which will set up
> the mach_type and other stuff. 

Nice!

I suppose you want to have struct containing pointers to both the detect() and
setup() functions, so you know which setup() function you have to call?

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                                            -- Linus Torvalds


<Prev in Thread] Current Thread [Next in Thread>