Subject: Re: how to detect at runtime which system you're running on...
To: Chris Gilbert <email@example.com>
From: Matt Thomas <firstname.lastname@example.org>
Date: 06/17/2001 16:47:27
At 11:31 PM 6/17/2001 +0100, you wrote:
>With the move towards different arch dirs, it's been suggested that archs
>that can merge do, eg EBSA285 and CATS, A7000 and RISCPC. However I'm
>currently unaware of an easy way to do runtime detection of arch. If someone
>knows of one I'm just being ignorant of, please shout up :)
>To make the merge for some ports is easier as other information differs, eg
>iomd version/cpu id can be used. However in the CATS and EBSA case the two
>machines are near identical, but not quite (eg footbridge/footbridge_pci.c
>has a #ifdef EBSA285 in it)
So? that just #ifdef becomes an if. footbridge_pci.c should just a global
that cats sets to true.
>To deal with this in a generic manner, I'd like to suggest we have an
>arm/arch_type.h header file, into which we have an enum of all the
>arch/platforms. We then have a variable for checking what arch the kernel is
>on. The variable being in arm/arm/cpufunc.c (or some other file decided on)
That seems overkill. This variable is only needed on per-port basis. It seems
to make sense to leave it that way.
Matt Thomas Internet: email@example.com
3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt/
Cupertino, CA Disclaimer: I avow all knowledge of this message