diff options
author | Mike Rapoport <rppt@linux.vnet.ibm.com> | 2018-09-10 12:23:18 +0300 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2018-09-14 12:37:28 -0700 |
commit | bcec54bf3118a26422cd83675cb461ef4dea81ef (patch) | |
tree | 8cd7e85d79392d0c3379086e2ab6ace7fd839a54 /arch/mips/kernel/traps.c | |
parent | 0eb1cfffd5433d8dce3e4163a5cd9accc6000856 (diff) | |
download | linux-bcec54bf3118a26422cd83675cb461ef4dea81ef.tar.gz linux-bcec54bf3118a26422cd83675cb461ef4dea81ef.tar.bz2 linux-bcec54bf3118a26422cd83675cb461ef4dea81ef.zip |
mips: switch to NO_BOOTMEM
MIPS already has memblock support and all the memory is already registered
with it.
This patch replaces bootmem memory reservations with memblock ones and
removes the bootmem initialization.
Since memblock allocates memory in top-down mode, we ensure that memblock
limit is max_low_pfn to prevent allocations from the high memory.
To have the exceptions base in the lower 512M of the physical memory, its
allocation in arch/mips/kernel/traps.c::traps_init() is using bottom-up
mode.
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20560/
Cc: Serge Semin <fancer.lancer@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r-- | arch/mips/kernel/traps.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 576aeef89423..5feef28deac8 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -29,6 +29,7 @@ #include <linux/spinlock.h> #include <linux/kallsyms.h> #include <linux/bootmem.h> +#include <linux/memblock.h> #include <linux/interrupt.h> #include <linux/ptrace.h> #include <linux/kgdb.h> @@ -2260,8 +2261,10 @@ void __init trap_init(void) unsigned long size = 0x200 + VECTORSPACING*64; phys_addr_t ebase_pa; + memblock_set_bottom_up(true); ebase = (unsigned long) __alloc_bootmem(size, 1 << fls(size), 0); + memblock_set_bottom_up(false); /* * Try to ensure ebase resides in KSeg0 if possible. |