]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/boot/memory.c
Merge branch 'linus' into core/printk
[linux-2.6-omap-h63xx.git] / arch / x86 / boot / memory.c
index 378353956b5dfc86469b66419b9680e1770a7410..acad32eb4290861b1539553c1e8eb49f7ec82e92 100644 (file)
@@ -9,8 +9,6 @@
  * ----------------------------------------------------------------------- */
 
 /*
- * arch/i386/boot/memory.c
- *
  * Memory detection code
  */
 
@@ -37,6 +35,12 @@ static int detect_memory_e820(void)
                      "=m" (*desc)
                    : "D" (desc), "d" (SMAP), "a" (0xe820));
 
+               /* BIOSes which terminate the chain with CF = 1 as opposed
+                  to %ebx = 0 don't always report the SMAP signature on
+                  the final, failing, probe. */
+               if (err)
+                       break;
+
                /* Some BIOSes stop returning SMAP in the middle of
                   the search loop.  We don't know exactly how the BIOS
                   screwed up the map at that point, we might have a
@@ -47,9 +51,6 @@ static int detect_memory_e820(void)
                        break;
                }
 
-               if (err)
-                       break;
-
                count++;
                desc++;
        } while (next && count < E820MAX);