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
此提交包含在:
@@ -389,7 +389,6 @@ static void __init node_mem_init(cnodeid_t node)
|
||||
{
|
||||
unsigned long slot_firstpfn = slot_getbasepfn(node, 0);
|
||||
unsigned long slot_freepfn = node_getfirstfree(node);
|
||||
unsigned long bootmap_size;
|
||||
unsigned long start_pfn, end_pfn;
|
||||
|
||||
get_pfn_range_for_nid(node, &start_pfn, &end_pfn);
|
||||
@@ -400,7 +399,6 @@ static void __init node_mem_init(cnodeid_t node)
|
||||
__node_data[node] = __va(slot_freepfn << PAGE_SHIFT);
|
||||
memset(__node_data[node], 0, PAGE_SIZE);
|
||||
|
||||
NODE_DATA(node)->bdata = &bootmem_node_data[node];
|
||||
NODE_DATA(node)->node_start_pfn = start_pfn;
|
||||
NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn;
|
||||
|
||||
@@ -409,12 +407,11 @@ static void __init node_mem_init(cnodeid_t node)
|
||||
slot_freepfn += PFN_UP(sizeof(struct pglist_data) +
|
||||
sizeof(struct hub_data));
|
||||
|
||||
bootmap_size = init_bootmem_node(NODE_DATA(node), slot_freepfn,
|
||||
start_pfn, end_pfn);
|
||||
free_bootmem_with_active_regions(node, end_pfn);
|
||||
reserve_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT,
|
||||
((slot_freepfn - slot_firstpfn) << PAGE_SHIFT) + bootmap_size,
|
||||
BOOTMEM_DEFAULT);
|
||||
|
||||
memblock_reserve(slot_firstpfn << PAGE_SHIFT,
|
||||
((slot_freepfn - slot_firstpfn) << PAGE_SHIFT));
|
||||
|
||||
sparse_memory_present_with_active_regions(node);
|
||||
}
|
||||
|
||||
|
新增問題並參考
封鎖使用者