]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - mm/sparse-vmemmap.c
mm: make swapin readahead skip over holes
[linux-2.6.git] / mm / sparse-vmemmap.c
index aa33fd67fa412bee2cef32e18c163d626e88bd00..1b7e22ab9b091bf34d857b5aeb36fd08039c0378 100644 (file)
@@ -9,7 +9,7 @@
  *
  * However, virtual mappings need a page table and TLBs. Many Linux
  * architectures already map their physical space using 1-1 mappings
- * via TLBs. For those arches the virtual memmory map is essentially
+ * via TLBs. For those arches the virtual memory map is essentially
  * for free if we use the same page size as the 1-1 mappings. In that
  * case the overhead consists of a few additional pages that are
  * allocated to create a view of memory for vmemmap.
@@ -21,7 +21,6 @@
 #include <linux/mmzone.h>
 #include <linux/bootmem.h>
 #include <linux/highmem.h>
-#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/vmalloc.h>
@@ -220,18 +219,7 @@ void __init sparse_mem_maps_populate_node(struct page **map_map,
 
        if (vmemmap_buf_start) {
                /* need to free left buf */
-#ifdef CONFIG_NO_BOOTMEM
-               free_early(__pa(vmemmap_buf_start), __pa(vmemmap_buf_end));
-               if (vmemmap_buf_start < vmemmap_buf) {
-                       char name[15];
-
-                       snprintf(name, sizeof(name), "MEMMAP %d", nodeid);
-                       reserve_early_without_check(__pa(vmemmap_buf_start),
-                                                   __pa(vmemmap_buf), name);
-               }
-#else
                free_bootmem(__pa(vmemmap_buf), vmemmap_buf_end - vmemmap_buf);
-#endif
                vmemmap_buf = NULL;
                vmemmap_buf_end = NULL;
        }