From: Hariprasad Nellitheertha <hari@in.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Vara Prasad <varap@us.ibm.com>
Subject: Re: [PATCH][2/4] kexec: Enable co-existence of normal kexec Image and kexec on panic Image
Date: Thu, 21 Oct 2004 16:19:21 +0530 [thread overview]
Message-ID: <41779431.5090104@in.ibm.com> (raw)
In-Reply-To: <41779345.8080009@in.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 231 bytes --]
This patch, to kexec, makes it possible to separate out the
two uses of kexec - for normal kexec usage and
kexec-on-panic. The image for the panic case is loaded using
the "kexec -p" option instead of "kexec -l".
Regards, Hari
[-- Attachment #2: kexec-panic.patch --]
[-- Type: text/plain, Size: 1841 bytes --]
Signed-off-by: Hariprasad Nellitheertha <hari@in.ibm.com>
---
linux-kexec-hari/include/linux/kexec.h | 1 +
linux-kexec-hari/kernel/kexec.c | 13 +++++--------
2 files changed, 6 insertions(+), 8 deletions(-)
diff -puN include/linux/kexec.h~kexec-panic include/linux/kexec.h
--- linux-kexec/include/linux/kexec.h~kexec-panic 2004-10-18 14:59:01.000000000 +0530
+++ linux-kexec-hari/include/linux/kexec.h 2004-10-18 15:00:33.000000000 +0530
@@ -52,5 +52,6 @@ extern asmlinkage long sys_kexec(unsigne
struct kexec_segment *segments);
extern struct page *kimage_alloc_control_pages(struct kimage *image, unsigned int order);
extern struct kimage *kexec_image;
+extern struct kimage *kexec_crash_image;
#endif
#endif /* LINUX_KEXEC_H */
diff -puN kernel/kexec.c~kexec-panic kernel/kexec.c
--- linux-kexec/kernel/kexec.c~kexec-panic 2004-10-18 14:59:01.000000000 +0530
+++ linux-kexec-hari/kernel/kexec.c 2004-10-19 14:12:33.000000000 +0530
@@ -585,6 +585,7 @@ static int kimage_load_segment(struct ki
* that to happen you need to do that yourself.
*/
struct kimage *kexec_image = NULL;
+struct kimage *kexec_crash_image = NULL;
asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments,
struct kexec_segment *segments, unsigned long flags)
@@ -596,13 +597,6 @@ asmlinkage long sys_kexec_load(unsigned
if (!capable(CAP_SYS_BOOT))
return -EPERM;
- /*
- * In case we need just a little bit of special behavior for
- * reboot on panic.
- */
- if (flags != 0)
- return -EINVAL;
-
if (nr_segments > KEXEC_SEGMENT_MAX)
return -EINVAL;
@@ -632,7 +626,10 @@ asmlinkage long sys_kexec_load(unsigned
}
}
- image = xchg(&kexec_image, image);
+ if (!flags)
+ image = xchg(&kexec_image, image);
+ else
+ image = xchg(&kexec_crash_image, image);
out:
kimage_free(image);
_
next prev parent reply other threads:[~2004-10-21 10:53 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 ` Hariprasad Nellitheertha [this message]
2004-10-21 10:51 ` [PATCH][3/4] kexec based dump: Minor bug fixes Hariprasad Nellitheertha
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=41779431.5090104@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.