]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/memory_hotplug.c
Merge branch 'master' of /repos/git/linux-2.6
[karo-tx-linux.git] / mm / memory_hotplug.c
index 67e941d7882c2a230db9ec91cbb5bfee1d38e6cb..78e34e63c7b880a03d3b7e043def593f81a65ac5 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:
@@ -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;