• Andrew Morton's avatar
    [PATCH] free_area_init cleanup · e07316f9
    Andrew Morton authored
    Patch from Martin Bligh.  It should only affect machines using
    discontigmem.
    
    "This patch cleans up free_area_init stuff, and undefines mem_map and
    max_mapnr for discontigmem, where they were horrible kludges anyway
    ...  We just use the lmem_maps instead, which makes much more sense.
    It also kills pgdat->node_start_mapnr, which is tarred with the same
    brush.
    
    It breaks free_area_init_core into a couple of sections, pulls the
    allocation of the lmem_map back into the next higher function, and
    passes more things via the pgdat.  But that's not very interesting,
    the objective was to kill mem_map for discontigmem, which seems to
    attract bugs like flypaper.  This brings any misuses to obvious
    compile-time errors rather than wierd oopses, which I can't help but
    feel is a good thing.
    
    It does break other discontigmem architectures, but in a very obvious
    way (they won't compile) and it's easy to fix.  I think that's a small
    price to pay ...  ;-) At some point soon I will follow up with a patch
    to remove free_area_init_node for the contig mem case, or at the very
    least rename it to something more sensible, like __free_area_init.
    
    Christoph has grander plans to kill mem_map more extensively in
    addition to the attatched, but I've heard nobody disagree that it
    should die for the discontigmem case at least.
    
    Oh, and I renamed mem_map in drivers/pcmcia/sa1100 to pc_mem_map
    because my tiny little brain (and cscope) find it confusing like that.
    
    Tested on 16-way NUMA-Q with discontigmem + NUMA support and on a
    standard PC (well, boots and appears functional).  On top of
    2.5.33-mm4"
    e07316f9
pgtable.h 21.8 KB