Re: [PATCH 2.6.17] Clean up and refactor i386 sub-architecture setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeremy Fitzhardinge wrote:
Zachary Amsden wrote:
This is cleaner than the patches I sent in March, although we want to re-use parts of the mach-default code, not replace it entirely. Hence my interest in the multi-subarch generic kernel. I'd be glad to look into it.
In my current Xen patch, I split the mach-default/setup.c into setup.c and setup-memory.c; Xen uses setup.c as-is, and then provides its own setup-xen.c. That solves my immediate problem, but I don't know if it generalizes enough; certainly factoring default/setup.c into a cluster of reusable setup-*.c pieces is a pretty lightweight way of reusing those pieces.

I was thinking more of having mach-xen/built-in.o, mach-default/built-in.o, mach-es7000/built-in.o, mach-voyager/built-in.o all be linked specially so they can be compiled into the same kernel either as one giant batch, with weak linkage and a function table to indirect calls to them (thus the generic kernel can jettison the modules outside of the subarch it has chosen at boot time, potentially keeping the default kernel as well to allow subarches to fallback on the traditional indirections). And if compiled as a specific kernel, those weak linkages get promoted to direct instead of indirect calls.

You may have to separate the namespaces at the identifier level as well, use some elven magic, but I haven't worked out all the details yet.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux