]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] Fix memory detection.
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 20 Nov 2007 10:13:39 +0000 (11:13 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 20 Nov 2007 10:13:48 +0000 (11:13 +0100)
Before we're getting short on memory detection fixes here is the next
one: if neither sclp nor diag260 report the storage size the detection
loop will return immediately without detecting anything. Fix this by
breaking the detection loop only if the memory end is known.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/early.c

index 8bf4ae1150be6775b2c348af2ee56a2786dd320c..1b3af7dab8161bf08ec6fd3d5110170b2c89f914 100644 (file)
@@ -200,7 +200,7 @@ static noinline __init void find_memory_chunks(unsigned long memsize)
                cc = __tprot(addr);
                while (cc == old_cc) {
                        addr += CHUNK_INCR;
-                       if (addr >= memsize)
+                       if (memsize && addr >= memsize)
                                break;
 #ifndef CONFIG_64BIT
                        if (addr == ADDR2G)