[PATCH] uml: locking comments in iomem driver
[safe/jmp/linux-2.6] / arch / um / kernel / mem.c
index 6128016..fb11992 100644 (file)
@@ -79,8 +79,10 @@ void mem_init(void)
 
        /* this will put all low memory onto the freelists */
        totalram_pages = free_all_bootmem();
+#ifdef CONFIG_HIGHMEM
        totalhigh_pages = highmem >> PAGE_SHIFT;
        totalram_pages += totalhigh_pages;
+#endif
        num_physpages = totalram_pages;
        max_pfn = totalram_pages;
        printk(KERN_INFO "Memory: %luk available\n", 
@@ -221,10 +223,14 @@ void paging_init(void)
 
        empty_zero_page = (unsigned long *) alloc_bootmem_low_pages(PAGE_SIZE);
        empty_bad_page = (unsigned long *) alloc_bootmem_low_pages(PAGE_SIZE);
-       for(i=0;i<sizeof(zones_size)/sizeof(zones_size[0]);i++) 
+       for(i = 0; i < ARRAY_SIZE(zones_size); i++)
                zones_size[i] = 0;
-       zones_size[ZONE_DMA] = (end_iomem >> PAGE_SHIFT) - (uml_physmem >> PAGE_SHIFT);
+
+       zones_size[ZONE_NORMAL] = (end_iomem >> PAGE_SHIFT) -
+               (uml_physmem >> PAGE_SHIFT);
+#ifdef CONFIG_HIGHMEM
        zones_size[ZONE_HIGHMEM] = highmem >> PAGE_SHIFT;
+#endif
        free_area_init(zones_size);
 
        /*
@@ -361,16 +367,6 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
        return pte;
 }
 
-struct iomem_region *iomem_regions = NULL;
-int iomem_size = 0;
-
-extern int parse_iomem(char *str, int *add) __init;
-
-__uml_setup("iomem=", parse_iomem,
-"iomem=<name>,<file>\n"
-"    Configure <file> as an IO memory region named <name>.\n\n"
-);
-
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically