Martin J. Bligh wrote: >>>>This patch adds a new file, arch/i386/kernel/summit.c, for >>>>summit-specific code. Adds some structures to mach_mpparse.h. Also >>>>adds a hook in setup_arch() to dig out the PCI info, and stores it in >>>>the mp_bus_id_to_node[] array, where it can be read by the topology >>>>functions. >>> >>>Wouldn't this file be better in arch/i386/mach-summit in keeping with >>>all the other subarch stuff? >>> >>>While you're creating a separate file for summit, could you move the >>>summit specific variables (mpparse.c:x86_summit is the only one, I >>>think) into it so we can clean all the summit references out of the main >>>line? >>> >>>Thanks, >>> >>>James >> >>While I was at it, I subarchified (I'll cc Websters with the new word ;) numaq as well. Copied mach-defaults setup.c, topology.c, and Makefile. Moved arch/i386/kernel/numaq.c into mach-numaq. Compiles. > > > > No, *please* don't do this. Subarch for .c files is *broken*. > > Last time I looked (and I don't think anyone has fixed it since) > it requires copying files all over the place, making an unmaintainable > nightmare. Either subarch needs fixing first, or we don't use it. > > Let's just stick with your original patch - it's fine. > > M. I'm inclined to agree with Martin on this one. The useless code duplication is outright stupidity. Makefile hackery would work, as would James' suggestion of #include'ing the .c files. I tend to agree with his assessment of that as the least of evils. But until we have a good way of falling back to mach-default for .c files, I'm going to leave the one (relatively) small .c file in arch/i386/kernel. It will be trivial to move it later, and for now it sits nicely next to it's kin: arch/i386/kernel/numaq.c. Original patch rediffed against 2.5.65 (just offsets) below. Cheers! -Matt