There are quite a few functions in i386's discontig.c which areI think you allocate remap pages for nothing in the flatmem case for node0...those aren't used for the mem map in !NUMA.
actually NUMA-specific, not discontigmem. They are also very
similar to the generic, flat functions found in setup.c.
This patch takes the versions in setup.c and makes them work
for both NUMA and non-NUMA cases. In the process, quite a
few nasty #ifdef and externs can be removed.
One of the main mechanisms to do this is that highstart_pfn
and highend_pfn are now gone, replaced by node_start/end_pfn[].
However, this has no real impact on storage space, because
those arrays are declared with a length of MAX_NUMNODES, which
is 1 when NUMA is off.