Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / arch / ia64 / mm / init.c
index 4eb2f59..95f3209 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright (C) 1998-2003 Hewlett-Packard Co
  *     David Mosberger-Tang <davidm@hpl.hp.com>
  */
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 
@@ -422,61 +423,6 @@ ia64_mmu_init (void *my_cpu_data)
 }
 
 #ifdef CONFIG_VIRTUAL_MEM_MAP
-int vmemmap_find_next_valid_pfn(int node, int i)
-{
-       unsigned long end_address, hole_next_pfn;
-       unsigned long stop_address;
-       pg_data_t *pgdat = NODE_DATA(node);
-
-       end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i];
-       end_address = PAGE_ALIGN(end_address);
-
-       stop_address = (unsigned long) &vmem_map[
-               pgdat->node_start_pfn + pgdat->node_spanned_pages];
-
-       do {
-               pgd_t *pgd;
-               pud_t *pud;
-               pmd_t *pmd;
-               pte_t *pte;
-
-               pgd = pgd_offset_k(end_address);
-               if (pgd_none(*pgd)) {
-                       end_address += PGDIR_SIZE;
-                       continue;
-               }
-
-               pud = pud_offset(pgd, end_address);
-               if (pud_none(*pud)) {
-                       end_address += PUD_SIZE;
-                       continue;
-               }
-
-               pmd = pmd_offset(pud, end_address);
-               if (pmd_none(*pmd)) {
-                       end_address += PMD_SIZE;
-                       continue;
-               }
-
-               pte = pte_offset_kernel(pmd, end_address);
-retry_pte:
-               if (pte_none(*pte)) {
-                       end_address += PAGE_SIZE;
-                       pte++;
-                       if ((end_address < stop_address) &&
-                           (end_address != ALIGN(end_address, 1UL << PMD_SHIFT)))
-                               goto retry_pte;
-                       continue;
-               }
-               /* Found next valid vmem_map page */
-               break;
-       } while (end_address < stop_address);
-
-       end_address = min(end_address, stop_address);
-       end_address = end_address - (unsigned long) vmem_map + sizeof(struct page) - 1;
-       hole_next_pfn = end_address / sizeof(struct page);
-       return hole_next_pfn - pgdat->node_start_pfn;
-}
 
 int __init
 create_mem_map_page_table (u64 start, u64 end, void *arg)
@@ -713,7 +659,7 @@ void online_page(struct page *page)
        num_physpages++;
 }
 
-int arch_add_memory(int nid, u64 start, u64 size)
+int add_memory(u64 start, u64 size)
 {
        pg_data_t *pgdat;
        struct zone *zone;
@@ -721,7 +667,7 @@ int arch_add_memory(int nid, u64 start, u64 size)
        unsigned long nr_pages = size >> PAGE_SHIFT;
        int ret;
 
-       pgdat = NODE_DATA(nid);
+       pgdat = NODE_DATA(0);
 
        zone = pgdat->node_zones + ZONE_NORMAL;
        ret = __add_pages(zone, start_pfn, nr_pages);
@@ -737,5 +683,4 @@ int remove_memory(u64 start, u64 size)
 {
        return -EINVAL;
 }
-EXPORT_SYMBOL_GPL(remove_memory);
 #endif