MIPS: Let early memblock_alloc*() allocate memories bottom-up
authorHuacai Chen <chenhc@lemote.com>
Sat, 10 Nov 2018 03:50:14 +0000 (11:50 +0800)
committerPaul Burton <paul.burton@mips.com>
Mon, 12 Nov 2018 19:36:58 +0000 (11:36 -0800)
commit25517ed4e99b3be4244dfd61d1e5c753b09faf2c
tree796674ecc7f5a8747645a1f4b7b67bb263c268b0
parent82fba2df7f7c019627f24c5036dc99f41731d770
MIPS: Let early memblock_alloc*() allocate memories bottom-up

After switched to NO_BOOTMEM, there are several boot failures. Some of
them have been fixed and some of them haven't. I find that many of them
are because of memory allocations are top-down, while the old behavior
is bottom-up. This patch let early memblock_alloc*() allocate memories
bottom-up to avoid some potential problems.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Fixes: bcec54bf3118 ("mips: switch to NO_BOOTMEM")
Patchwork: https://patchwork.linux-mips.org/patch/21069/
References: https://patchwork.linux-mips.org/patch/21031/
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <james.hogan@mips.com>
Cc: Steven J . Hill <Steven.Hill@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
arch/mips/kernel/setup.c
arch/mips/kernel/traps.c