public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] [PATCH 1/2] introduce crashboot kernel command line parameter
@ 2006-06-23 21:01 Vivek Goyal
  2006-06-23 21:04 ` [RFC] [PATCH 2/2] kdump: cciss driver initialization issue fix Vivek Goyal
                   ` (2 more replies)
  0 siblings, 3 replies; 38+ messages in thread
From: Vivek Goyal @ 2006-06-23 21:01 UTC (permalink / raw)
  To: linux kernel mailing list
  Cc: Fastboot mailing list, Linux SCSI Mailing list, Eric W. Biederman,
	Morton Andrew Morton, mike.miller


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 **);
_

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2006-06-27  2:42 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-23 21:01 [RFC] [PATCH 1/2] introduce crashboot kernel command line parameter Vivek Goyal
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox