Matthew Dobson wrote: > Ok, I made an attempt to clean up this mess quite a while ago (2.5.47), > but that patch is utterly useless now. At Martin's urging I've created > a new series of patches to resolve this. > > 01 - Make sure MAX_NUMNODES is defined in one and only one place. Remove > superfluous definitions. Instead of defining MAX_NUMNODES in > asm/numnodes.h, we define NODES_SHIFT there. Then in linux/mmzone.h we > turn that NODES_SHIFT value into MAX_NUMNODES. > > 02 - Remove MAX_NR_NODES. This value is only used in a couple of > places, and it's incorrectly used in all those places as far as I can > tell. Replace with MAX_NUMNODES. Create MAX_NODES_SHIFT and use this > value to check NODES_SHIFT is appropriate. A possible future patch > should make MAX_NODES_SHIFT vary based on 32 vs. 64 bit archs. > > 03 - Fix up the sh arch. sh defined NR_NODES, change sh to use standard > MAX_NUMNODES instead. > > 04 - Fix up the arm arch. This needs to be reviewed. Relatively > straightforward replacement of NR_NODES with standard MAX_NUMNODES. > > 05 - Fix up the ia64 arch. This *definitely* needs to be reviewed. This > code made my head hurt. I think I may have gotten it right. Totally > untested. Cheers! -Matt