WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

[Xen-ia64-devel] [patch 06/16] Kexec/Kdump: honour non-zero crashkernel

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [patch 06/16] Kexec/Kdump: honour non-zero crashkernel offset
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Wed, 12 Sep 2007 17:28:40 +0900
Delivery-date: Wed, 12 Sep 2007 01:45:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070912082834.175658477@xxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.46-1
There seems to be a value in both allowing the kernel to determine
the base offset of the crashkernel automatically and allowing
users's to sepcify it.

The old behaviour on ia64, which is still the current behaviour on
most architectures is for the user to always specify the address.
Recently ia64 was changed so that it is always automatically determined.

With this patch the kernel automatically determines the offset if
the supplied value is 0, otherwise it uses the value provided.

This should probably be backed by a documentation change.

Signed-Off-By: Simon Horman <horms@xxxxxxxxxxxx>
Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>

---
>From Linux upstream, commit ad1c3ba7e54fc38b119c1a7d5c98f9ffb8227fdb

 arch/ia64/kernel/setup.c |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

Index: linux-2.6.18-xen.hg/arch/ia64/kernel/setup.c
===================================================================
--- linux-2.6.18-xen.hg.orig/arch/ia64/kernel/setup.c   2007-07-09 
15:00:34.000000000 +0900
+++ linux-2.6.18-xen.hg/arch/ia64/kernel/setup.c        2007-07-09 
15:03:32.000000000 +0900
@@ -299,7 +299,7 @@ reserve_memory (void)
 
 #ifdef CONFIG_KEXEC
        /* crashkernel=size@offset specifies the size to reserve for a crash
-        * kernel.(offset is ingored for keep compatibility with other archs)
+        * kernel. If offset is 0, then it is determined automatically.
         * By reserving this memory we guarantee that linux never set's it
         * up as a DMA target.Useful for holding code to do something
         * appropriate after a kernel panic.
@@ -310,10 +310,16 @@ reserve_memory (void)
 #ifndef CONFIG_XEN
                if (from) {
                        size = memparse(from + 12, &from);
+                       if (*from == '@')
+                               base = memparse(from+1, &from);
+                       else
+                               base = 0;
                        if (size) {
-                               sort_regions(rsvd_region, n);
-                               base = kdump_find_rsvd_region(size,
-                               rsvd_region, n);
+                               if (!base) {
+                                       sort_regions(rsvd_region, n);
+                                       base = kdump_find_rsvd_region(size,
+                                                               rsvd_region, n);
+                                       }
                                if (base != ~0UL) {
                                        rsvd_region[n].start =
                                                (unsigned long)__va(base);

-- 

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


_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>