All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hariprasad Nellitheertha <hari@in.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Vara Prasad <varap@us.ibm.com>
Subject: Re: [PATCH][4/4] kexec based dump: Minor cleanups
Date: Thu, 21 Oct 2004 16:22:58 +0530	[thread overview]
Message-ID: <4177950A.6090404@in.ibm.com> (raw)
In-Reply-To: <417794AC.8060604@in.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

This patch moves some crashdump related calls out of 
machine_kexec so that we leave the core kexec code untouched.

Regards, Hari

[-- Attachment #2: kd-cleanup.patch --]
[-- Type: text/plain, Size: 2096 bytes --]


Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Hariprasad Nellitheertha <hari@in.ibm.com>
---

 linux-2.6.9-rc4-hari/arch/i386/kernel/machine_kexec.c |   10 ----------
 linux-2.6.9-rc4-hari/kernel/crash.c                   |    9 +++++++++
 2 files changed, 9 insertions(+), 10 deletions(-)

diff -puN arch/i386/kernel/machine_kexec.c~kd-cleanup arch/i386/kernel/machine_kexec.c
--- linux-2.6.9-rc4/arch/i386/kernel/machine_kexec.c~kd-cleanup	2004-10-21 15:11:05.000000000 +0530
+++ linux-2.6.9-rc4-hari/arch/i386/kernel/machine_kexec.c	2004-10-21 15:11:05.000000000 +0530
@@ -195,9 +195,6 @@ void machine_kexec(struct kimage *image)
 	unsigned long reboot_code_buffer;
 	relocate_new_kernel_t rnk;
 
-	crash_dump_stop_cpus();
-	crash_dump_save_registers();
-
 	/* Interrupts aren't acceptable while we reboot */
 	local_irq_disable();
 
@@ -208,13 +205,6 @@ void machine_kexec(struct kimage *image)
 	/* Set up an identity mapping for the reboot_code_buffer */
 	identity_map_page(reboot_code_buffer);
 
-	/*
-	 * If we are here to do a crash dump, save the memory from
-	 * 0-640k before we copy over the kexec kernel image.  Otherwise
-	 * our dump will show the wrong kernel entirely.
-	 */
-	crash_relocate_mem();
-
 	/* copy it out */
 	memcpy((void *)reboot_code_buffer, relocate_new_kernel, relocate_new_kernel_size);
 
diff -puN kernel/crash.c~kd-cleanup kernel/crash.c
--- linux-2.6.9-rc4/kernel/crash.c~kd-cleanup	2004-10-21 15:11:05.000000000 +0530
+++ linux-2.6.9-rc4-hari/kernel/crash.c	2004-10-21 15:11:05.000000000 +0530
@@ -71,6 +71,15 @@ void __crash_machine_kexec(void)
 	if (image) {
 		crashed = 1;
 		printk(KERN_EMERG "kexec: opening parachute\n");
+		crash_dump_stop_cpus();
+		crash_dump_save_registers();
+
+         /* If we are here to do a crash dump, save the memory from
+          * 0-640k before we copy over the kexec kernel image.  Otherwise
+          * our dump will show the wrong kernel entirely.
+          */
+        	crash_relocate_mem();
+
 		machine_kexec(image);
 	} else {
 		printk(KERN_EMERG "kexec: No kernel image loaded!\n");
_

      reply	other threads:[~2004-10-21 10:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21 10:43 kexec based crashdumps Hariprasad Nellitheertha
2004-10-21 10:45 ` [PATCH][1/4] kexec based dump: Loading kernel from non-default offset Hariprasad Nellitheertha
2004-10-21 10:49   ` [PATCH][2/4] kexec: Enable co-existence of normal kexec Image and kexec on panic Image Hariprasad Nellitheertha
2004-10-21 10:51     ` [PATCH][3/4] kexec based dump: Minor bug fixes Hariprasad Nellitheertha
2004-10-21 10:52       ` Hariprasad Nellitheertha [this message]

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=4177950A.6090404@in.ibm.com \
    --to=hari@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=varap@us.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.