[PATCH] Fix CONFIG_BIGMEM on 2.3.19

Stephen C. Tweedie (sct@redhat.com)
Tue, 5 Oct 1999 11:10:00 +0100 (BST)


Hi,

The new memory init changes in 2.3.19 break CONFIG_BIGMEM. The main
memory page setup loop in arch/i386/mm/init used to count in physical
pages, but is now biased in advance by PAGE_OFFSET. If we have
CONFIG_BIGMEM set, that means that the loop can wrap quite legitimately,
but the loop termination condition isn't prepared for that.

--Stephen

----------------------------------------------------------------
--- arch/i386/mm/init.c.~1~ Tue Oct 5 10:22:41 1999
+++ arch/i386/mm/init.c Tue Oct 5 10:23:08 1999
@@ -429,7 +429,10 @@
end = PAGE_OFFSET + ((addr + size) & PAGE_MASK);
addr= PAGE_OFFSET + PAGE_ALIGN(addr);

- for ( ; addr < end; addr += PAGE_SIZE) {
+ /* Be prepared for this to wrap if CONFIG_BIGMEM is set,
+ * as we are about to walk pages in virtual address
+ * space */
+ for ( ; addr != end; addr += PAGE_SIZE) {

/* this little bit of grossness is for dealing
* with memory borrowing for system bookkeeping

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/