From: Vivek Goyal <vgoyal@in.ibm.com>
To: linux kernel mailing list <linux-kernel@vger.kernel.org>
Cc: Fastboot mailing list <fastboot@lists.osdl.org>,
Linux SCSI Mailing list <linux-scsi@vger.kernel.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Morton Andrew Morton <akpm@osdl.org>,
mike.miller@hp.com
Subject: [RFC] [PATCH 1/2] introduce crashboot kernel command line parameter
Date: Fri, 23 Jun 2006 17:01:21 -0400 [thread overview]
Message-ID: <20060623210121.GA18384@in.ibm.com> (raw)
o Add kernel command line option "crashboot"
o This option is an indication to the kernel that kernel is booting in an
unreliable environment where possibly BIOS execution has been skipped
and devices are left operational or in unknown state.
o Kernel, especially device drivers can use this option to take special
actions like soft-resetting the device, relaxing some of the rules
to make sure kernel can boot/device driver can initiliaze in this
environment.
o As of today this option is useful to Kdump. Kdump will pass this option
to second kernel to improve the reliability of successful kenrel boot/
device driver initializatoin.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
---
linux-2.6.17-1M-vivek/Documentation/kernel-parameters.txt | 9 ++++++
linux-2.6.17-1M-vivek/include/linux/init.h | 1
linux-2.6.17-1M-vivek/init/main.c | 19 ++++++++++++++
3 files changed, 29 insertions(+)
diff -puN Documentation/kernel-parameters.txt~introduce-crash-boot-command-line-parameter Documentation/kernel-parameters.txt
--- linux-2.6.17-1M/Documentation/kernel-parameters.txt~introduce-crash-boot-command-line-parameter 2006-06-23 10:54:39.000000000 -0400
+++ linux-2.6.17-1M-vivek/Documentation/kernel-parameters.txt 2006-06-23 13:47:28.000000000 -0400
@@ -405,6 +405,15 @@ running once the system is up.
[KNL] Reserve a chunk of physical memory to
hold a kernel to switch to with kexec on panic.
+ crashboot [KNL] Use this if kernel is booting in a potentially
+ unreliable environement. For ex. kdump, where new
+ kernel is booting after the first kernel crash and
+ BIOS has been skipped and devices are in unknown
+ state.
+
+ Device drivers might soft reset the devices before
+ doing further device initialization.
+
cs4232= [HW,OSS]
Format: <io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>
diff -puN init/main.c~introduce-crash-boot-command-line-parameter init/main.c
--- linux-2.6.17-1M/init/main.c~introduce-crash-boot-command-line-parameter 2006-06-23 13:14:49.000000000 -0400
+++ linux-2.6.17-1M-vivek/init/main.c 2006-06-23 13:34:34.000000000 -0400
@@ -121,6 +121,17 @@ char saved_command_line[COMMAND_LINE_SIZ
static char *execute_command;
static char *ramdisk_execute_command;
+/*
+ * If set, indicates that kernel is booting in an unreliable environment.
+ * For ex. kdump situaiton where previous kernel has crashed, BIOS has been
+ * skipped and devices will be in unknown state.
+ *
+ * Device drivers can use it to know that underlying device is in unknown
+ * state and might even be finishing commands issued from previous kernel's
+ * context.
+ */
+unsigned int crash_boot;
+
/* Setup configured maximum number of CPUs to activate */
static unsigned int max_cpus = NR_CPUS;
@@ -150,6 +161,14 @@ static int __init maxcpus(char *str)
__setup("maxcpus=", maxcpus);
+static int __init set_crash_boot(char *str)
+{
+ crash_boot = 1;
+ return 1;
+}
+
+__setup("crashboot", set_crash_boot);
+
static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
static const char *panic_later, *panic_param;
diff -puN include/linux/init.h~introduce-crash-boot-command-line-parameter include/linux/init.h
--- linux-2.6.17-1M/include/linux/init.h~introduce-crash-boot-command-line-parameter 2006-06-23 15:00:25.000000000 -0400
+++ linux-2.6.17-1M-vivek/include/linux/init.h 2006-06-23 15:00:41.000000000 -0400
@@ -69,6 +69,7 @@ extern initcall_t __security_initcall_st
/* Defined in init/main.c */
extern char saved_command_line[];
+extern unsigned int crash_boot;
/* used by init/main.c */
extern void setup_arch(char **);
_
next reply other threads:[~2006-06-23 21:01 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-23 21:01 Vivek Goyal [this message]
2006-06-23 21:04 ` [RFC] [PATCH 2/2] kdump: cciss driver initialization issue fix Vivek Goyal
2006-06-24 6:55 ` Andrew Morton
2006-06-24 11:19 ` Vivek Goyal
2006-06-24 11:30 ` Andrew Morton
2006-06-24 12:08 ` Vivek Goyal
2006-06-24 17:13 ` Eric W. Biederman
2006-06-26 2:11 ` [Fastboot] " Maneesh Soni
2006-06-26 13:35 ` Vivek Goyal
2006-06-26 14:17 ` Eric W. Biederman
2006-06-26 15:32 ` Vivek Goyal
2006-06-26 16:00 ` Eric W. Biederman
2006-06-26 16:13 ` Miller, Mike (OS Dev)
2006-06-26 16:35 ` Vivek Goyal
2006-06-26 16:38 ` Eric W. Biederman
2006-06-26 16:51 ` Miller, Mike (OS Dev)
2006-06-26 17:04 ` Vivek Goyal
2006-06-26 17:24 ` Andrew Morton
2006-06-26 17:22 ` Vivek Goyal
2006-06-26 17:52 ` Eric W. Biederman
2006-06-26 18:18 ` Vivek Goyal
2006-06-26 18:51 ` Miller, Mike (OS Dev)
2006-06-26 19:21 ` Eric W. Biederman
2006-06-26 19:43 ` Vivek Goyal
2006-06-26 21:24 ` Miller, Mike (OS Dev)
2006-06-26 19:36 ` Vivek Goyal
2006-06-26 17:16 ` Vivek Goyal
2006-06-26 17:31 ` Andrew Morton
2006-06-26 17:39 ` Eric W. Biederman
2006-06-26 17:56 ` James Bottomley
2006-06-26 18:23 ` Eric W. Biederman
2006-06-27 2:42 ` [RFC] [PATCH 2/2] kdump: cciss driver initialization?issue fix Horms
2006-06-26 9:09 ` Horms
2006-06-26 13:45 ` [Fastboot] " Vivek Goyal
2006-06-27 2:30 ` Horms
2006-06-23 21:30 ` [RFC] [PATCH 1/2] introduce crashboot kernel command line parameter Bernd Eckenfels
2006-06-23 22:39 ` Vivek Goyal
2006-06-24 6:55 ` Andrew Morton
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=20060623210121.GA18384@in.ibm.com \
--to=vgoyal@in.ibm.com \
--cc=akpm@osdl.org \
--cc=ebiederm@xmission.com \
--cc=fastboot@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mike.miller@hp.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