WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] kdump pv-on-hvm: introduce "reset_dev

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] kdump pv-on-hvm: introduce "reset_devices" command line option
From: Xen patchbot-linux-2.6.18-xen <patchbot@xxxxxxx>
Date: Tue, 05 Apr 2011 12:50:06 +0100
Delivery-date: Tue, 05 Apr 2011 04:50:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1302003699 -3600
# Node ID 9ca43064684151a24940cccd49102db6c73621ca
# Parent  e6edaed332cba4ddc3e25fe061cbf7b29bc5264a
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@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxx>
---


diff -r e6edaed332cb -r 9ca430646841 Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt       Tue Apr 05 12:39:33 2011 +0100
+++ b/Documentation/kernel-parameters.txt       Tue Apr 05 12:41:39 2011 +0100
@@ -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 e6edaed332cb -r 9ca430646841 include/linux/init.h
--- a/include/linux/init.h      Tue Apr 05 12:39:33 2011 +0100
+++ b/include/linux/init.h      Tue Apr 05 12:41:39 2011 +0100
@@ -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 e6edaed332cb -r 9ca430646841 init/main.c
--- a/init/main.c       Tue Apr 05 12:39:33 2011 +0100
+++ b/init/main.c       Tue Apr 05 12:41:39 2011 +0100
@@ -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;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] kdump pv-on-hvm: introduce "reset_devices" command line option, Xen patchbot-linux-2 . 6 . 18-xen <=