linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / um / kernel / physmem.c
index fc0f0b0..544665e 100644 (file)
@@ -9,7 +9,6 @@
 #include "linux/vmalloc.h"
 #include "linux/bootmem.h"
 #include "linux/module.h"
-#include "linux/pfn.h"
 #include "asm/types.h"
 #include "asm/pgtable.h"
 #include "kern_util.h"
@@ -280,7 +279,7 @@ int init_maps(unsigned long physmem, unsigned long iomem, unsigned long highmem)
 
        for(i = 0; i < total_pages; i++){
                p = &map[i];
-               memset(p, 0, sizeof(struct page));
+               set_page_count(p, 0);
                SetPageReserved(p);
                INIT_LIST_HEAD(&p->lru);
        }
@@ -317,6 +316,8 @@ void map_memory(unsigned long virt, unsigned long phys, unsigned long len,
        }
 }
 
+#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
+
 extern int __syscall_stub_start, __binary_start;
 
 void setup_physmem(unsigned long start, unsigned long reserve_end,
@@ -407,8 +408,6 @@ unsigned long find_iomem(char *driver, unsigned long *len_out)
                        *len_out = region->size;
                        return(region->virt);
                }
-
-               region = region->next;
        }
 
        return(0);