[PATCH] memory-hotplug-implement-register_page_bootmem_info_section-of-sparse-vmemmap.patchfix

From: Michal Hocko
Date: Fri Jan 11 2013 - 04:50:42 EST


Defconfig for x86_64 complains
arch/x86/mm/init_64.c: In function âregister_page_bootmem_memmapâ:
arch/x86/mm/init_64.c:1340: error: implicit declaration of function âget_page_bootmemâ
arch/x86/mm/init_64.c:1340: error: âMIX_SECTION_INFOâ undeclared (first
use in this function)
arch/x86/mm/init_64.c:1340: error: (Each undeclared identifier is
reported only once
arch/x86/mm/init_64.c:1340: error: for each function it appears in.)
arch/x86/mm/init_64.c:1361: error: âSECTION_INFOâ undeclared (first use in this function)

put register_page_bootmem_memmap inside CONFIG_MEMORY_HOTPLUG_SPARSE
and include memory_hotplug.h in arch/x86/mm/init_64.c

Signed-off-by: Michal Hocko <mhocko@xxxxxxx>
---
arch/x86/mm/init_64.c | 3 +++
include/linux/mm.h | 2 ++
2 files changed, 5 insertions(+)

diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index ddd3b58..d8edf52 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -32,6 +32,7 @@
#include <linux/memory_hotplug.h>
#include <linux/nmi.h>
#include <linux/gfp.h>
+#include <linux/memory_hotplug.h>

#include <asm/processor.h>
#include <asm/bios_ebda.h>
@@ -1317,6 +1318,7 @@ vmemmap_populate(struct page *start_page, unsigned long size, int node)
return 0;
}

+#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
void register_page_bootmem_memmap(unsigned long section_nr,
struct page *start_page, unsigned long size)
{
@@ -1374,6 +1376,7 @@ void register_page_bootmem_memmap(unsigned long section_nr,
}
}
}
+#endif

void __meminit vmemmap_populate_print_last(void)
{
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7c57bd0..67e0c31 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1724,8 +1724,10 @@ void vmemmap_populate_print_last(void);
#ifdef CONFIG_MEMORY_HOTPLUG
void vmemmap_free(struct page *memmap, unsigned long nr_pages);
#endif
+#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
void register_page_bootmem_memmap(unsigned long section_nr, struct page *map,
unsigned long size);
+#endif

enum mf_flags {
MF_COUNT_INCREASED = 1 << 0,
--
1.7.10.4

--
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/