Skip to content

Commit ff38df3

Browse files
committed
s390: Use HAVE_MEMBLOCK_NODE_MAP
s390 used early_node_map[] just to prime free_area_init_nodes(). Now memblock can be used for the same purpose and early_node_map[] is scheduled to be dropped. Use memblock instead. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: linux-s390@vger.kernel.org
1 parent 9d15ffc commit ff38df3

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎arch/s390/Kconfig‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ config S390
9292
select HAVE_ARCH_JUMP_LABEL if !MARCH_G5
9393
select HAVE_RCU_TABLE_FREE if SMP
9494
select ARCH_SAVE_PAGE_KEYS if HIBERNATION
95+
select HAVE_MEMBLOCK
96+
select HAVE_MEMBLOCK_NODE_MAP
97+
select ARCH_DISCARD_MEMBLOCK
9598
select ARCH_INLINE_SPIN_TRYLOCK
9699
select ARCH_INLINE_SPIN_TRYLOCK_BH
97100
select ARCH_INLINE_SPIN_LOCK

‎arch/s390/kernel/setup.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/module.h>
2222
#include <linux/sched.h>
2323
#include <linux/kernel.h>
24+
#include <linux/memblock.h>
2425
#include <linux/mm.h>
2526
#include <linux/stddef.h>
2627
#include <linux/unistd.h>
@@ -820,7 +821,8 @@ setup_memory(void)
820821
end_chunk = min(end_chunk, end_pfn);
821822
if (start_chunk >= end_chunk)
822823
continue;
823-
add_active_range(0, start_chunk, end_chunk);
824+
memblock_add_node(PFN_PHYS(start_chunk),
825+
PFN_PHYS(end_chunk - start_chunk), 0);
824826
pfn = max(start_chunk, start_pfn);
825827
for (; pfn < end_chunk; pfn++)
826828
page_set_storage_key(PFN_PHYS(pfn),

0 commit comments

Comments
 (0)