Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/mem_detect: add info source debug print

Print mem_detect info source when memblock=debug is specified.

Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Vasily Gorbik and committed by
Martin Schwidefsky
f01b8bca 54c57795

+17
+17
arch/s390/kernel/setup.c
··· 748 748 memblock_add_range(&memblock.physmem, start, size, 0, 0); 749 749 } 750 750 751 + static const char * __init get_mem_info_source(void) 752 + { 753 + switch (mem_detect.info_source) { 754 + case MEM_DETECT_SCLP_STOR_INFO: 755 + return "sclp storage info"; 756 + case MEM_DETECT_DIAG260: 757 + return "diag260"; 758 + case MEM_DETECT_SCLP_READ_INFO: 759 + return "sclp read info"; 760 + case MEM_DETECT_BIN_SEARCH: 761 + return "binary search"; 762 + } 763 + return "none"; 764 + } 765 + 751 766 static void __init memblock_add_mem_detect_info(void) 752 767 { 753 768 unsigned long start, end; 754 769 int i; 755 770 771 + memblock_dbg("physmem info source: %s (%hhd)\n", 772 + get_mem_info_source(), mem_detect.info_source); 756 773 /* keep memblock lists close to the kernel */ 757 774 memblock_set_bottom_up(true); 758 775 for_each_mem_detect_block(i, &start, &end)