]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
s390/mem_detect: use SCLP info for continuous memory detection
authorVasily Gorbik <gor@linux.ibm.com>
Wed, 11 Apr 2018 16:54:40 +0000 (18:54 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 9 Oct 2018 09:21:11 +0000 (11:21 +0200)
When neither SCLP storage info, nor z/VM diag260 "storage configuration"
are available assume a continuous online memory of size specified by
SCLP info.

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
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>
arch/s390/boot/mem_detect.c
arch/s390/include/asm/mem_detect.h

index 42b0cd23f04aea3e78decad33279ee407ac913a9..3becf6bbe4c7e6e117fa0b2419e4a0a9a501c134 100644 (file)
@@ -184,8 +184,13 @@ void detect_memory(void)
                return;
        }
 
+       if (max_physmem_end) {
+               add_mem_detect_block(0, max_physmem_end);
+               mem_detect.info_source = MEM_DETECT_SCLP_READ_INFO;
+               return;
+       }
+
        scan_memory(rzm);
        mem_detect.info_source = MEM_DETECT_TPROT_LOOP;
-       if (!max_physmem_end)
-               max_physmem_end = get_mem_detect_end();
+       max_physmem_end = get_mem_detect_end();
 }
index 6047a28656f5a360761e9273a8721c67cc7765d7..153c3542fa8a47e6511fabf14ebba824a860fc66 100644 (file)
@@ -8,6 +8,7 @@ enum mem_info_source {
        MEM_DETECT_NONE = 0,
        MEM_DETECT_SCLP_STOR_INFO,
        MEM_DETECT_DIAG260,
+       MEM_DETECT_SCLP_READ_INFO,
        MEM_DETECT_TPROT_LOOP
 };