Skip to content

Commit 6ad5f02

Browse files
Vasily Gorbikhcahca
authored andcommitted
s390/setup: re-arrange memblock setup
- Avoid using ULONG_MAX in memblock_remove, it has no functional change but makes memblock_dbg output a range which makes sense. - Actually finish memblock memory setup before doing amode31/cr/uv setup. - Move memblock_dump_all() debug output after memblock memory setup is complete. This gives us final "memory" regions if they were trimmed due to addressing limits and still "physmem" regions as original info which came from mem_detect. Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent 5dbc4cb commit 6ad5f02

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

arch/s390/kernel/setup.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ static void __init setup_resources(void)
606606

607607
static void __init setup_memory_end(void)
608608
{
609-
memblock_remove(ident_map_size, ULONG_MAX);
609+
memblock_remove(ident_map_size, PHYS_ADDR_MAX - ident_map_size);
610610
max_pfn = max_low_pfn = PFN_DOWN(ident_map_size);
611611
pr_notice("The maximum memory size is %luMB\n", ident_map_size >> 20);
612612
}
@@ -777,7 +777,6 @@ static void __init memblock_add_mem_detect_info(void)
777777
}
778778
memblock_set_bottom_up(false);
779779
memblock_set_node(0, ULONG_MAX, &memblock.memory, 0);
780-
memblock_dump_all();
781780
}
782781

783782
/*
@@ -999,13 +998,13 @@ void __init setup_arch(char **cmdline_p)
999998
memblock_add_mem_detect_info();
1000999

10011000
free_mem_detect_info();
1001+
setup_memory_end();
1002+
memblock_dump_all();
1003+
setup_memory();
10021004

10031005
relocate_amode31_section();
10041006
setup_cr();
1005-
10061007
setup_uv();
1007-
setup_memory_end();
1008-
setup_memory();
10091008
dma_contiguous_reserve(ident_map_size);
10101009
vmcp_cma_reserve();
10111010
if (MACHINE_HAS_EDAT2)

0 commit comments

Comments
 (0)