Skip to content

Commit

Permalink
x86: clean up min_low_pfn
Browse files Browse the repository at this point in the history
for 32bit
we already had early_res support, so don't need to track min_low_pfn.
keep it to 0 always.

also use init_bootmem_node instead of init_bootmem, so don't touch
min_low_pfn.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent 2ec65f8 commit 346cafe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 4 additions & 6 deletions arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,11 +565,7 @@ void __init find_low_pfn_range(void)
{
/* it could update max_pfn */

/*
* partially used pages are not usable - thus
* we are rounding upwards:
*/
min_low_pfn = PFN_UP(init_pg_tables_end);
/* max_low_pfn is 0, we already have early_res support */

max_low_pfn = max_pfn;
if (max_low_pfn > MAXMEM_PFN) {
Expand Down Expand Up @@ -694,7 +690,9 @@ void __init setup_bootmem_allocator(void)
panic("Cannot find bootmem map of size %ld\n", bootmap_size);
reserve_early(bootmap, bootmap + bootmap_size, "BOOTMAP");

bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, max_low_pfn);
/* don't touch min_low_pfn */
bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap >> PAGE_SHIFT,
min_low_pfn, max_low_pfn);
printk(KERN_INFO " mapped low ram: 0 - %08lx\n",
max_pfn_mapped<<PAGE_SHIFT);
printk(KERN_INFO " low ram: %08lx - %08lx\n",
Expand Down
4 changes: 3 additions & 1 deletion arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,9 @@ void __init initmem_init(unsigned long start_pfn, unsigned long end_pfn)
PAGE_SIZE);
if (bootmap == -1L)
panic("Cannot find bootmem map of size %ld\n", bootmap_size);
bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, end_pfn);
/* don't touch min_low_pfn */
bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap >> PAGE_SHIFT,
0, end_pfn);
e820_register_active_regions(0, start_pfn, end_pfn);
free_bootmem_with_active_regions(0, end_pfn);
early_res_to_bootmem(0, end_pfn<<PAGE_SHIFT);
Expand Down

0 comments on commit 346cafe

Please sign in to comment.