Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29c380f5 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky
Browse files

[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: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent de46c337
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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;