Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3343
b: refs/heads/master
c: 92aa63a
h: refs/heads/master
i:
  3341: 7a31c07
  3339: 0999c6e
  3335: bb23d42
  3327: c5a9a02
v: v3
  • Loading branch information
Vivek Goyal authored and Linus Torvalds committed Jun 25, 2005
1 parent 4d71341 commit 5067986
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d58831e4163699de204dea199be2e903bf5d6eff
refs/heads/master: 92aa63a5a1bf2e7b0c79e6716d24b76dbbdcf951
12 changes: 12 additions & 0 deletions trunk/arch/i386/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
#include "setup_arch_pre.h"
#include <bios_ebda.h>

/* Forward Declaration. */
void __init find_max_pfn(void);

/* This value is set up by the early boot code to point to the value
immediately after the boot time page tables. It contains a *physical*
address, and must not be in the .bss segment! */
Expand Down Expand Up @@ -736,6 +739,15 @@ static void __init parse_cmdline_early (char ** cmdline_p)
if (to != command_line)
to--;
if (!memcmp(from+7, "exactmap", 8)) {
#ifdef CONFIG_CRASH_DUMP
/* If we are doing a crash dump, we
* still need to know the real mem
* size before original memory map is
* reset.
*/
find_max_pfn();
saved_max_pfn = max_pfn;
#endif
from += 8+7;
e820.nr_map = 0;
userdef = 1;
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/linux/bootmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ extern unsigned long min_low_pfn;
*/
extern unsigned long max_pfn;

#ifdef CONFIG_CRASH_DUMP
extern unsigned long saved_max_pfn;
#endif

/*
* node_bootmem_map is a map pointer - the bits represent all physical
* memory pages (including holes) on the node.
Expand Down
8 changes: 8 additions & 0 deletions trunk/mm/bootmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ EXPORT_SYMBOL(max_pfn); /* This is exported so
* dma_get_required_mask(), which uses
* it, can be an inline function */

#ifdef CONFIG_CRASH_DUMP
/*
* If we have booted due to a crash, max_pfn will be a very low value. We need
* to know the amount of memory that the previous kernel used.
*/
unsigned long saved_max_pfn;
#endif

/* return the number of _pages_ that will be allocated for the boot bitmap */
unsigned long __init bootmem_bootmap_pages (unsigned long pages)
{
Expand Down

0 comments on commit 5067986

Please sign in to comment.