From: Heiko Carstens Date: Fri, 27 Apr 2007 14:01:04 +0000 (+0200) Subject: [S390] memory detection: stop at first memory hole. X-Git-Tag: v2.6.22-rc1~1130^2~37 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29c380f5f06d0c5a320b9bb6f8987065e7b81c91;p=linux-2.6 [S390] memory detection: stop at first memory hole. If both sclp and diag memory detection don't work stop at the first memory hole. Otherwise the code might loop forever... Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens --- diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 5e47936573..50538e5456 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c @@ -253,11 +253,10 @@ static noinline __init void find_memory_chunks(unsigned long memsize) break; #endif /* - * Finish memory detection at the first hole, unless - * - we reached the hsa -> skip it. - * - we know there must be more. + * Finish memory detection at the first hole + * if storage size is unknown. */ - if (cc == -1UL && !memsize && old_addr != ADDR2G) + if (cc == -1UL && !memsize) break; if (memsize && addr >= memsize) break;