public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Horms <horms@verge.net.au>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] [IA64] Point saved_max_pfn to the max_pfn of the entire system
Date: Wed, 14 Feb 2007 02:38:07 +0000	[thread overview]
Message-ID: <20070214023806.GC24549@verge.net.au> (raw)

On Tue, Feb 13, 2007 at 06:25:34PM +0100, Bernhard Walle wrote:
> Hello,
> 
> * Zou Nan hai <nanhai.zou@intel.com> [2007-02-08 05:21]:
> >
> > 	This is reasonable.
> > 	So please apply the following patch to make saved_max_pfn point to
> > max_pfn of entire system.
> 
> So, as the patch works here also and it's necessary to make kdump
> working, I suggest including it mainline.

Agreed, below is a version of the patch for Linus' tree as of this morning.

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/

[IA64] Point saved_max_pfn to the max_pfn of the entire system

	Please apply the following patch to make saved_max_pfn point to
max_pfn of entire system.

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>

Without this patch is so that vmcore is zero length on ia64.
This is because saved_max_pfn was wrongly being set to the
max_pfn of the crash kernel's address space, rather than the 
max_pfg on the physical memory of the machine - the whole purpose of
vmcore is to access physical memory that is not part of the
crash kernel's addresss space.

Updated for recent changes in Linus' tree.

Signed-off-by: Simon Horman <horms@verge.net.au>

 arch/ia64/kernel/efi.c   |    6 ++++++
 arch/ia64/mm/contig.c    |    5 -----
 arch/ia64/mm/discontig.c |    6 ------
 3 files changed, 6 insertions(+), 11 deletions(-)

Index: linux-2.6/arch/ia64/kernel/efi.c
=================================--- linux-2.6.orig/arch/ia64/kernel/efi.c	2007-02-14 11:15:11.000000000 +0900
+++ linux-2.6/arch/ia64/kernel/efi.c	2007-02-14 11:15:47.000000000 +0900
@@ -21,6 +21,7 @@
  *	Skip non-WB memory and ignore empty memory ranges.
  */
 #include <linux/module.h>
+#include <linux/bootmem.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
@@ -1009,6 +1010,11 @@
 		} else
 			ae = efi_md_end(md);
 
+#ifdef CONFIG_CRASH_DUMP
+		/* saved_max_pfn should ignore max_addr= command line arg */
+		if (saved_max_pfn < (ae >> PAGE_SHIFT))
+			saved_max_pfn = (ae >> PAGE_SHIFT);
+#endif
 		/* keep within max_addr= and min_addr= command line arg */
 		as = max(as, min_addr);
 		ae = min(ae, max_addr);
Index: linux-2.6/arch/ia64/mm/contig.c
=================================--- linux-2.6.orig/arch/ia64/mm/contig.c	2007-02-14 10:58:21.000000000 +0900
+++ linux-2.6/arch/ia64/mm/contig.c	2007-02-14 11:15:11.000000000 +0900
@@ -197,11 +197,6 @@
 
 	find_initrd();
 
-#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. */
-	saved_max_pfn = max_pfn;
-#endif
 }
 
 #ifdef CONFIG_SMP
Index: linux-2.6/arch/ia64/mm/discontig.c
=================================--- linux-2.6.orig/arch/ia64/mm/discontig.c	2007-02-14 10:58:21.000000000 +0900
+++ linux-2.6/arch/ia64/mm/discontig.c	2007-02-14 11:15:11.000000000 +0900
@@ -480,12 +480,6 @@
 	max_pfn = max_low_pfn;
 
 	find_initrd();
-
-#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. */
-        saved_max_pfn = max_pfn;
-#endif
 }
 
 #ifdef CONFIG_SMP

                 reply	other threads:[~2007-02-14  2:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070214023806.GC24549@verge.net.au \
    --to=horms@verge.net.au \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox