Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99727
b: refs/heads/master
c: c8c034c
h: refs/heads/master
i:
  99725: 683e9c1
  99723: 0093a63
  99719: c22d203
  99711: 7b07a8d
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jun 3, 2008
1 parent 0aae66a commit 0d65bf2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6af61a7614a306fe882a0c2b4ddc63b65aa66efc
refs/heads/master: c8c034ce79418d2143c00c4cf751cfa51701f788
15 changes: 3 additions & 12 deletions trunk/arch/x86/kernel/e820_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,12 @@ unsigned long __init e820_end_of_ram(void)

last_pfn = find_max_pfn_with_active_regions();

if (last_pfn > max_pfn_mapped)
max_pfn_mapped = last_pfn;
if (max_pfn_mapped > MAXMEM>>PAGE_SHIFT)
max_pfn_mapped = MAXMEM>>PAGE_SHIFT;
if (last_pfn > MAXMEM>>PAGE_SHIFT)
last_pfn = MAXMEM>>PAGE_SHIFT;
if (last_pfn > end_user_pfn)
last_pfn = end_user_pfn;
if (last_pfn > max_pfn_mapped)
last_pfn = max_pfn_mapped;

printk(KERN_INFO "max_pfn_mapped = %lu\n", max_pfn_mapped);
printk(KERN_INFO "last_pfn = %lu\n", last_pfn);
return last_pfn;
}

Expand Down Expand Up @@ -109,10 +105,6 @@ static int __init e820_find_active_region(const struct e820entry *ei,
if (*ei_startpfn >= *ei_endpfn)
return 0;

/* Check if max_pfn_mapped should be updated */
if (ei->type != E820_RAM && *ei_endpfn > max_pfn_mapped)
max_pfn_mapped = *ei_endpfn;

/* Skip if map is outside the node */
if (ei->type != E820_RAM || *ei_endpfn <= start_pfn ||
*ei_startpfn >= last_pfn)
Expand Down Expand Up @@ -229,7 +221,6 @@ static int __init parse_memmap_opt(char *p)
saved_max_pfn = e820_end_of_ram();
remove_all_active_ranges();
#endif
max_pfn_mapped = 0;
e820.nr_map = 0;
userdef = 1;
return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ void __init setup_arch(char **cmdline_p)

check_efer();

max_pfn_mapped = init_memory_mapping(0, (max_pfn_mapped << PAGE_SHIFT));
max_pfn_mapped = init_memory_mapping(0, (end_pfn << PAGE_SHIFT));
if (efi_enabled)
efi_init();

Expand Down

0 comments on commit 0d65bf2

Please sign in to comment.