From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xensource.com
Subject: [PATCH 1 of 2] kdump pv-on-hvm: introduce "reset_devices" command line option
Date: Tue, 05 Apr 2011 12:14:28 +0200 [thread overview]
Message-ID: <6cc1c07f0e74cd481d1c.1301998468@localhost> (raw)
In-Reply-To: <patchbomb.1301998467@localhost>
# HG changeset patch
# User Olaf Hering <olaf@aepfle.de>
# Date 1301997980 -7200
# Node ID 6cc1c07f0e74cd481d1cde0f17bec2631a767891
# Parent 0bee20f8e418d32ab5828eb57c7542ca27ce425d
kdump pv-on-hvm: introduce "reset_devices" command line option
upstream commit 7e96287ddc4f42081e18248b6167041c0908004c
[PATCH] kdump: introduce "reset_devices" command line option
Resetting the devices during driver initialization can be a costly
operation in terms of time (especially scsi devices). This option can be
used by drivers to know that user forcibly wants the devices to be reset
during initialization.
This option can be useful while kernel is booting in unreliable
environment. For ex. during kdump boot where devices are in unknown
random state and BIOS execution has been skipped.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
Documentation/kernel-parameters.txt | 3 +++
include/linux/init.h | 1 +
init/main.c | 20 ++++++++++++++++++++
3 files changed, 24 insertions(+)
diff -r 0bee20f8e418 -r 6cc1c07f0e74 Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt Sat Apr 02 15:54:29 2011 +0100
+++ b/Documentation/kernel-parameters.txt Tue Apr 05 12:06:20 2011 +0200
@@ -1392,6 +1392,9 @@
reserve= [KNL,BUGS] Force the kernel to ignore some iomem area
+ reset_devices [KNL] Force drivers to reset the underlying device
+ during initialization.
+
resume= [SWSUSP]
Specify the partition device for software suspend
diff -r 0bee20f8e418 -r 6cc1c07f0e74 include/linux/init.h
--- a/include/linux/init.h Sat Apr 02 15:54:29 2011 +0100
+++ b/include/linux/init.h Tue Apr 05 12:06:20 2011 +0200
@@ -68,6 +68,7 @@
/* Defined in init/main.c */
extern char saved_command_line[];
+extern unsigned int reset_devices;
/* used by init/main.c */
extern void setup_arch(char **);
diff -r 0bee20f8e418 -r 6cc1c07f0e74 init/main.c
--- a/init/main.c Sat Apr 02 15:54:29 2011 +0100
+++ b/init/main.c Tue Apr 05 12:06:20 2011 +0200
@@ -128,6 +128,18 @@
static unsigned int max_cpus = NR_CPUS;
/*
+ * If set, this is an indication to the drivers that reset the underlying
+ * device before going ahead with the initialization otherwise driver might
+ * rely on the BIOS and skip the reset operation.
+ *
+ * This is useful if 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.
+ */
+unsigned int reset_devices;
+EXPORT_SYMBOL(reset_devices);
+
+/*
* Setup routine for controlling SMP activation
*
* Command-line option of "nosmp" or "maxcpus=0" will disable SMP
@@ -153,6 +165,14 @@
__setup("maxcpus=", maxcpus);
+static int __init set_reset_devices(char *str)
+{
+ reset_devices = 1;
+ return 1;
+}
+
+__setup("reset_devices", set_reset_devices);
+
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;
next prev parent reply other threads:[~2011-04-05 10:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-05 10:14 [PATCH 0 of 2] linux-2.6.18: kdump for pv-on-hvm guests Olaf Hering
2011-04-05 10:14 ` Olaf Hering [this message]
2011-04-05 10:14 ` [PATCH 2 of 2] kdump pv-on-hvm: reset PV devices in crash kernel Olaf Hering
2011-04-05 13:54 ` Konrad Rzeszutek Wilk
2011-04-05 13:56 ` Olaf Hering
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=6cc1c07f0e74cd481d1c.1301998468@localhost \
--to=olaf@aepfle.de \
--cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).