fs: xattr_handler table should be const
[safe/jmp/linux-2.6] / mm / memory_hotplug.c
index 67e941d..be211a5 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/pfn.h>
 #include <linux/suspend.h>
 #include <linux/mm_inline.h>
+#include <linux/firmware-map.h>
 
 #include <asm/tlbflush.h>
 
@@ -72,7 +73,9 @@ static void get_page_bootmem(unsigned long info,  struct page *page, int type)
        atomic_inc(&page->_count);
 }
 
-void put_page_bootmem(struct page *page)
+/* reference to __meminit __free_pages_bootmem is valid
+ * so use __ref to tell modpost not to generate a warning */
+void __ref put_page_bootmem(struct page *page)
 {
        int type;
 
@@ -521,6 +524,9 @@ int __ref add_memory(int nid, u64 start, u64 size)
                BUG_ON(ret);
        }
 
+       /* create new memmap entry */
+       firmware_map_add_hotplug(start, start + size, "System RAM");
+
        goto out;
 
 error:
@@ -682,9 +688,9 @@ do_migrate_range(unsigned long start_pfn, unsigned long end_pfn)
                        if (page_count(page))
                                not_managed++;
 #ifdef CONFIG_DEBUG_VM
-                       printk(KERN_INFO "removing from LRU failed"
-                                        " %lx/%d/%lx\n",
-                               pfn, page_count(page), page->flags);
+                       printk(KERN_ALERT "removing pfn %lx from LRU failed\n",
+                              pfn);
+                       dump_page(page);
 #endif
                }
        }
@@ -751,7 +757,7 @@ check_pages_isolated(unsigned long start_pfn, unsigned long end_pfn)
        return offlined;
 }
 
-int offline_pages(unsigned long start_pfn,
+static int offline_pages(unsigned long start_pfn,
                  unsigned long end_pfn, unsigned long timeout)
 {
        unsigned long pfn, nr_pages, expire;