aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/init_32.c')
-rw-r--r--arch/x86/mm/init_32.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 90e054589aae..63b09bae2509 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -25,6 +25,7 @@
25#include <linux/pfn.h> 25#include <linux/pfn.h>
26#include <linux/poison.h> 26#include <linux/poison.h>
27#include <linux/bootmem.h> 27#include <linux/bootmem.h>
28#include <linux/memblock.h>
28#include <linux/proc_fs.h> 29#include <linux/proc_fs.h>
29#include <linux/memory_hotplug.h> 30#include <linux/memory_hotplug.h>
30#include <linux/initrd.h> 31#include <linux/initrd.h>
@@ -712,14 +713,14 @@ void __init initmem_init(unsigned long start_pfn, unsigned long end_pfn,
712 highstart_pfn = highend_pfn = max_pfn; 713 highstart_pfn = highend_pfn = max_pfn;
713 if (max_pfn > max_low_pfn) 714 if (max_pfn > max_low_pfn)
714 highstart_pfn = max_low_pfn; 715 highstart_pfn = max_low_pfn;
715 e820_register_active_regions(0, 0, highend_pfn); 716 memblock_x86_register_active_regions(0, 0, highend_pfn);
716 sparse_memory_present_with_active_regions(0); 717 sparse_memory_present_with_active_regions(0);
717 printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", 718 printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
718 pages_to_mb(highend_pfn - highstart_pfn)); 719 pages_to_mb(highend_pfn - highstart_pfn));
719 num_physpages = highend_pfn; 720 num_physpages = highend_pfn;
720 high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1; 721 high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
721#else 722#else
722 e820_register_active_regions(0, 0, max_low_pfn); 723 memblock_x86_register_active_regions(0, 0, max_low_pfn);
723 sparse_memory_present_with_active_regions(0); 724 sparse_memory_present_with_active_regions(0);
724 num_physpages = max_low_pfn; 725 num_physpages = max_low_pfn;
725 high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1; 726 high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
@@ -776,16 +777,16 @@ void __init setup_bootmem_allocator(void)
776{ 777{
777#ifndef CONFIG_NO_BOOTMEM 778#ifndef CONFIG_NO_BOOTMEM
778 int nodeid; 779 int nodeid;
779 unsigned long bootmap_size, bootmap; 780 phys_addr_t bootmap_size, bootmap;
780 /* 781 /*
781 * Initialize the boot-time allocator (with low memory only): 782 * Initialize the boot-time allocator (with low memory only):
782 */ 783 */
783 bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT; 784 bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT;
784 bootmap = find_e820_area(0, max_pfn_mapped<<PAGE_SHIFT, bootmap_size, 785 bootmap = memblock_find_in_range(0, max_pfn_mapped<<PAGE_SHIFT, bootmap_size,
785 PAGE_SIZE); 786 PAGE_SIZE);
786 if (bootmap == -1L) 787 if (bootmap == MEMBLOCK_ERROR)
787 panic("Cannot find bootmem map of size %ld\n", bootmap_size); 788 panic("Cannot find bootmem map of size %ld\n", bootmap_size);
788 reserve_early(bootmap, bootmap + bootmap_size, "BOOTMAP"); 789 memblock_x86_reserve_range(bootmap, bootmap + bootmap_size, "BOOTMAP");
789#endif 790#endif
790 791
791 printk(KERN_INFO " mapped low ram: 0 - %08lx\n", 792 printk(KERN_INFO " mapped low ram: 0 - %08lx\n",
@@ -1069,3 +1070,4 @@ void mark_rodata_ro(void)
1069#endif 1070#endif
1070} 1071}
1071#endif 1072#endif
1073