Re: [RFC] [PATCH] subarch cleanup

From: Martin J. Bligh (mbligh@aracnet.com)
Date: Thu Nov 21 2002 - 16:47:52 EST


>> Header files go under include ....
>
> In this instance I'd disagree. Think about UML. UML has:
>
> include/asm-um/*.h
> include/asm-um/arch -> include/asm-i386
>
> When building for UML, what happens if you need to get to a machine
> specific file for something, and the i386 include files do:
>
> #include <asm/mach-generic/foo.h>
>
> Yep, it fails.

I don't understand what UML is trying to do here, but if it wants
the architecture specific stuff, it has to do it in the same way
as the arch itself. That's UML's problem ... it sounds like it's
just making invalid assumptions. Maybe the include paths
need to be in a seperate makefile to avoid maintainance problems.
 
> Now guess why we in the ARM community haven't even bothered to look at
> UML yet? There's over 1MB of include files that would need to be moved,
> along with countless #include statements needing to be fixed up.
>
> For something that would be nice to have, and probably run quite well on
> the ARM architecture (due to some nice features ARM has, especially for
> UML's jail mode) there isn't enough interest in it to warrant such a
> painful reorganisation.
>
> I'd therefore strongly recommend NOT going down the path of adding
> subdirectories to include/asm-*.

Another way to fix this (which might be simpler anyway) is to leave
the Makefiles alone and create:

include/asm-i386/mach_apic.h
        #ifdef CONFIG_XYZ_MACHINE
                #include <asm/mach-xyz/mach_apic.h>
        #else
                #include <asm/mach-generic/mach_apic.h>

Or something along those lines.

Whilst it's a nice idea in principle, the current subarch system does
not scale to any real number of subarches beyond 1 or 2, and need some
rejigging.

M.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:38 EST