• Michael Ellerman's avatar
    [PATCH] powerpc: Unify mem= handling · 2babf5c2
    Michael Ellerman authored
    We currently do mem= handling in three seperate places. And as benh pointed out
    I wrote two of them. Now that we parse command line parameters earlier we can
    clean this mess up.
    
    Moving the parsing out of prom_init means the device tree might be allocated
    above the memory limit. If that happens we'd have to move it. As it happens
    we already have logic to do that for kdump, so just genericise it.
    
    This also means we might have reserved regions above the memory limit, if we
    do the bootmem allocator will blow up, so we have to modify
    lmb_enforce_memory_limit() to truncate the reserves as well.
    
    Tested on P5 LPAR, iSeries, F50, 44p. Tested moving device tree on P5 and
    44p and F50.
    Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    2babf5c2
prom.c 50.5 KB