diff options
-rw-r--r-- | arch/x86/xen/enlighten.c | 3 | ||||
-rw-r--r-- | mm/memblock.c | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 7d46c8441418..63b83ceebd1a 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/console.h> | 30 | #include <linux/console.h> |
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <linux/gfp.h> | 32 | #include <linux/gfp.h> |
33 | #include <linux/memblock.h> | ||
33 | 34 | ||
34 | #include <xen/xen.h> | 35 | #include <xen/xen.h> |
35 | #include <xen/interface/xen.h> | 36 | #include <xen/interface/xen.h> |
@@ -1183,6 +1184,8 @@ asmlinkage void __init xen_start_kernel(void) | |||
1183 | local_irq_disable(); | 1184 | local_irq_disable(); |
1184 | early_boot_irqs_off(); | 1185 | early_boot_irqs_off(); |
1185 | 1186 | ||
1187 | memblock_init(); | ||
1188 | |||
1186 | xen_raw_console_write("mapping kernel into physical memory\n"); | 1189 | xen_raw_console_write("mapping kernel into physical memory\n"); |
1187 | pgd = xen_setup_kernel_pagetable(pgd, xen_start_info->nr_pages); | 1190 | pgd = xen_setup_kernel_pagetable(pgd, xen_start_info->nr_pages); |
1188 | 1191 | ||
diff --git a/mm/memblock.c b/mm/memblock.c index 9ad39690a2bd..ae8b06c828c7 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -752,6 +752,12 @@ void __init memblock_analyze(void) | |||
752 | 752 | ||
753 | void __init memblock_init(void) | 753 | void __init memblock_init(void) |
754 | { | 754 | { |
755 | static int init_done __initdata = 0; | ||
756 | |||
757 | if (init_done) | ||
758 | return; | ||
759 | init_done = 1; | ||
760 | |||
755 | /* Hookup the initial arrays */ | 761 | /* Hookup the initial arrays */ |
756 | memblock.memory.regions = memblock_memory_init_regions; | 762 | memblock.memory.regions = memblock_memory_init_regions; |
757 | memblock.memory.max = INIT_MEMBLOCK_REGIONS; | 763 | memblock.memory.max = INIT_MEMBLOCK_REGIONS; |