From: Hariprasad Nellitheertha <hari@in.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Vara Prasad <varap@us.ibm.com>
Subject: Re: [PATCH][3/4] kexec based dump: Minor bug fixes
Date: Thu, 21 Oct 2004 16:21:24 +0530 [thread overview]
Message-ID: <417794AC.8060604@in.ibm.com> (raw)
In-Reply-To: <41779431.5090104@in.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
This patch fixes a problem where the kernel compilation was
failing upon disabling PROC_FS. It also ensures the
reboot-on-panic kernel is pointed to by a different
variable, thereby separating the normal use of kexec from
the crashdump situation.
Regards, Hari
[-- Attachment #2: kd-misc-changes.patch --]
[-- Type: text/plain, Size: 4426 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/Documentation/kdump.txt | 24 ++++++++----------------
linux-2.6.9-rc4-hari/include/linux/crash_dump.h | 11 ++++++++---
linux-2.6.9-rc4-hari/kernel/crash.c | 5 ++++-
3 files changed, 20 insertions(+), 20 deletions(-)
diff -puN Documentation/kdump.txt~kd-misc-changes Documentation/kdump.txt
--- linux-2.6.9-rc4/Documentation/kdump.txt~kd-misc-changes 2004-10-21 15:10:58.000000000 +0530
+++ linux-2.6.9-rc4-hari/Documentation/kdump.txt 2004-10-21 15:10:58.000000000 +0530
@@ -27,19 +27,11 @@ SETUP
1) Obtain the appropriate -mm tree patch and apply it on to the vanilla
kernel tree.
-2) In order to enable the kernel to boot from a non-default location, the
- following patches (by Eric Biederman) needs to be applied.
-
- http://www.xmission.com/~ebiederm/files/kexec/2.6.8.1-kexec3/
- broken-out/highbzImage.i386.patch
- http://www.xmission.com/~ebiederm/files/kexec/2.6.8.1-kexec3/
- broken-out/vmlinux-lds.i386.patch
-
-3) Two kernels need to be built in order to get this feature working.
+2) Two kernels need to be built in order to get this feature working.
For the first kernel, choose the default values for the following options.
- a) Physical address where the kernel expects to be loaded
+ a) Physical address where the kernel is loaded
b) kexec system call
c) kernel crash dumps
@@ -51,28 +43,28 @@ SETUP
Also ensure you have CONFIG_HIGHMEM on.
-4) Boot into the first kernel. You are now ready to try out kexec based crash
+3) Boot into the first kernel. You are now ready to try out kexec based crash
dumps.
-5) Load the second kernel to be booted using
+4) Load the second kernel to be booted using
- kexec -l <second-kernel> --args-linux --append="root=<root-dev> dump
+ kexec -p <second-kernel> --args-linux --append="root=<root-dev> dump
init 1 memmap=exactmap memmap=640k@0 memmap=32M@16M"
Note that <second-kernel> has to be a vmlinux image. bzImage will not
work, as of now.
-6) Enable kexec based dumping by
+5) Enable kexec based dumping by
echo 1 > /proc/kexec-dump
If this is not set, the system will not do a kexec reboot in the event
of a panic.
-7) System reboots into the second kernel when a panic occurs.
+6) System reboots into the second kernel when a panic occurs.
You could write a module to call panic, for testing purposes.
-8) Write out the dump file using
+7) Write out the dump file using
cp /proc/vmcore <dump-file>
diff -puN include/linux/crash_dump.h~kd-misc-changes include/linux/crash_dump.h
--- linux-2.6.9-rc4/include/linux/crash_dump.h~kd-misc-changes 2004-10-21 15:10:58.000000000 +0530
+++ linux-2.6.9-rc4-hari/include/linux/crash_dump.h 2004-10-21 15:10:58.000000000 +0530
@@ -15,15 +15,20 @@ extern void elf_kcore_store_hdr(char *,
#ifdef CONFIG_CRASH_DUMP
extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, int);
extern void __crash_machine_kexec(void);
-extern void crash_enable_by_proc(void);
-extern void crash_create_proc_entry(void);
extern int crash_dump_on;
static inline void crash_machine_kexec(void)
{
__crash_machine_kexec();
}
#else
+#define crash_machine_kexec() do { } while(0)
+#endif
+
+
+#if defined(CONFIG_CRASH_DUMP) && defined(CONFIG_PROC_FS)
+extern void crash_enable_by_proc(void);
+extern void crash_create_proc_entry(void);
+#else
#define crash_enable_by_proc() do { } while(0)
#define crash_create_proc_entry() do { } while(0)
-#define crash_machine_kexec() do { } while(0)
#endif
diff -puN kernel/crash.c~kd-misc-changes kernel/crash.c
--- linux-2.6.9-rc4/kernel/crash.c~kd-misc-changes 2004-10-21 15:10:58.000000000 +0530
+++ linux-2.6.9-rc4-hari/kernel/crash.c 2004-10-21 15:10:58.000000000 +0530
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/uaccess.h>
+#ifdef CONFIG_PROC_FS
/*
* Enable kexec reboot upon panic; for dumping
*/
@@ -57,6 +58,8 @@ void crash_create_proc_entry(void)
}
}
+#endif /* CONFIG_PROC_FS */
+
void __crash_machine_kexec(void)
{
struct kimage *image;
@@ -64,7 +67,7 @@ void __crash_machine_kexec(void)
if ((!crash_dump_on) || (crashed))
return;
- image = xchg(&kexec_image, 0);
+ image = xchg(&kexec_crash_image, 0);
if (image) {
crashed = 1;
printk(KERN_EMERG "kexec: opening parachute\n");
_
next prev parent 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 ` Hariprasad Nellitheertha [this message]
2004-10-21 10:52 ` [PATCH][4/4] kexec based dump: Minor cleanups Hariprasad Nellitheertha
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=417794AC.8060604@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome