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 2/3] IA64: log insertion of crashkernel region
Date: Tue, 06 Mar 2007 07:28:51 +0000	[thread overview]
Message-ID: <20070306073756.030729468@tabatha.lab.ultramonkey.org> (raw)

This patch adds a faclilty to print out a message regarding the success or
failure of inserting the crashkernel region. On systems with a large
ammount of memory, the chances of failure tend to be quite low, especially
now that the base address of the region can be determined by the kernel.
However, on systems with less memory, such as Xen's Domain 0, it
can occur, and silently failing is confusing to say the least.

It also updates the error message generated by kdump_find_rsvd_region()
if it can't locate a base address for the requested crashkernel region,
which is really just another failure mode for the problem detailed
in the paragraph above.

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

 linux-2.6/arch/ia64/kernel/efi.c |   25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

Index: linux-2.6/arch/ia64/kernel/efi.c
=================================--- linux-2.6.orig/arch/ia64/kernel/efi.c	2007-03-06 16:25:46.000000000 +0900
+++ linux-2.6/arch/ia64/kernel/efi.c	2007-03-06 16:25:46.000000000 +0900
@@ -1049,6 +1049,9 @@
 	u64 efi_desc_size;
 	char *name;
 	unsigned long flags;
+#ifdef CONFIG_KEXEC
+	int crashk_res_inserted = 0;
+#endif
 
 	efi_map_start = __va(ia64_boot_param->efi_memmap);
 	efi_map_end   = efi_map_start + ia64_boot_param->efi_memmap_size;
@@ -1125,11 +1128,25 @@
 #ifdef CONFIG_KEXEC
                         insert_resource(res, &efi_memmap_res);
                         insert_resource(res, &boot_param_res);
-			if (crashk_res.end > crashk_res.start)
-				insert_resource(res, &crashk_res);
+			if (!crashk_res_inserted &&
+			    crashk_res.end > crashk_res.start &&
+			    insert_resource(res, &crashk_res) >= 0)
+				crashk_res_inserted = 1;
+
 #endif
 		}
 	}
+
+	if (crashk_res.end > crashk_res.start) {
+		if (crashk_res_inserted)
+			printk(KERN_ERR "Kdump: registered crashdump: "
+			       "0x%08lx-0x%08lx\n", crashk_res.start,
+			       crashk_res.end);
+		else
+			printk(KERN_ERR "Kdump: failed to insert resource for "
+			       "crashdump: 0x%08lx-0x%08lx\n",
+			       crashk_res.start, crashk_res.end);
+	}
 }
 
 #ifdef CONFIG_KEXEC
@@ -1172,8 +1189,8 @@
 		return start;
   }
 
-  printk(KERN_WARNING "Cannot reserve 0x%lx byte of memory for crashdump\n",
-	size);
+  printk(KERN_WARNING "Kdump: failed to find a base address for 0x%lx bytes"
+	 "of memory for crashdump\n", size);
   return ~0UL;
 }
 #endif

--

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


             reply	other threads:[~2007-03-06  7:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06  7:28 Horms [this message]
2007-03-06  8:29 ` [patch 2/3] IA64: log insertion of crashkernel region Zou, Nanhai
2007-03-07  0:59 ` Horms

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=20070306073756.030729468@tabatha.lab.ultramonkey.org \
    --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