diff options
-rw-r--r-- | arch/powerpc/kernel/prom.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 831a201e03d..8ad825c063c 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -737,12 +737,15 @@ void __init early_init_devtree(void *params) | |||
737 | 737 | ||
738 | of_scan_flat_dt(early_init_dt_scan_root, NULL); | 738 | of_scan_flat_dt(early_init_dt_scan_root, NULL); |
739 | of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL); | 739 | of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL); |
740 | setup_initial_memory_limit(memstart_addr, first_memblock_size); | ||
741 | 740 | ||
742 | /* Save command line for /proc/cmdline and then parse parameters */ | 741 | /* Save command line for /proc/cmdline and then parse parameters */ |
743 | strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE); | 742 | strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE); |
744 | parse_early_param(); | 743 | parse_early_param(); |
745 | 744 | ||
745 | /* make sure we've parsed cmdline for mem= before this */ | ||
746 | if (memory_limit) | ||
747 | first_memblock_size = min(first_memblock_size, memory_limit); | ||
748 | setup_initial_memory_limit(memstart_addr, first_memblock_size); | ||
746 | /* Reserve MEMBLOCK regions used by kernel, initrd, dt, etc... */ | 749 | /* Reserve MEMBLOCK regions used by kernel, initrd, dt, etc... */ |
747 | memblock_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START); | 750 | memblock_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START); |
748 | /* If relocatable, reserve first 32k for interrupt vectors etc. */ | 751 | /* If relocatable, reserve first 32k for interrupt vectors etc. */ |