Good spotting!
There are some cosmetic things about your patch that I didn't like
(tweaking the output from the memory_region debug printk), so I
modified it slightly:
--- linux-2.3.16p1/arch/i386/mm/init.c.orig Sat Sep 4 13:01:10 1999
+++ linux-2.3.16p1/arch/i386/mm/init.c Sat Sep 4 13:09:39 1999
@@ -375,7 +375,7 @@
int datapages = 0;
int initpages = 0;
unsigned long tmp;
- unsigned long addr;
+ unsigned long addr, size;
int i, avail;
end_mem &= PAGE_MASK;
@@ -418,11 +418,14 @@
printk("memory region: %luk @ %08lx\n",
((long)(e820.map[i].size)) / 1024,
(long)(e820.map[i].addr) );
- for (addr=PAGE_ALIGN(((long)(e820.map[i].addr)))+PAGE_OFFSET,
- tmp = 0;
- tmp < (unsigned long)(e820.map[i].size);
- tmp += PAGE_SIZE,
- addr += PAGE_SIZE) {
+
+ /* honour page alignment */
+ addr = e820.map[i].addr;
+ size = e820.map[i].size - (PAGE_ALIGN(addr) - addr);
+ size >>= PAGE_SHIFT;
+ addr = PAGE_ALIGN(addr) + PAGE_OFFSET;
+
+ for (; size > 0; size--, addr += PAGE_SIZE) {
/* this little bit of grossness is for dealing
* with memory borrowing for system bookkeeping
-- ____ david parsons \bi/ What, you mean people don't write bioses just \/ to accomodate Linux? The Nerve!!!- 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/