Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0b8da654b6c13b40b0e0efd916ee57ed13f9fa1f
Commit:     0b8da654b6c13b40b0e0efd916ee57ed13f9fa1f
Parent:     0d2be08893605be00de0f95ee7e4b8917ea1ebc3
Author:     Heiko Carstens <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 5 11:10:11 2007 +0100
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Mon Nov 5 11:10:17 2007 +0100

    [S390] Fix memory detection.
    
    Yet another patch in the countless series of memory detection fixes:
    if the last area of the reported storage size is a hole the detection
    loop will loop forever.
    Just break chunk detection loop if its end is going to be larger than
    reported storage size.
    
    Signed-off-by: Heiko Carstens <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 arch/s390/kernel/early.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index e6289ee..8bf4ae1 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -200,11 +200,13 @@ static noinline __init void find_memory_chunks(unsigned 
long memsize)
                cc = __tprot(addr);
                while (cc == old_cc) {
                        addr += CHUNK_INCR;
-                       cc = __tprot(addr);
+                       if (addr >= memsize)
+                               break;
 #ifndef CONFIG_64BIT
                        if (addr == ADDR2G)
                                break;
 #endif
+                       cc = __tprot(addr);
                }
 
                if (old_addr != addr &&
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to