+ kdump-introduce-reset_devices-command-line-option.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     kdump: introduce "reset_devices" command line option

has been added to the -mm tree.  Its filename is

     kdump-introduce-reset_devices-command-line-option.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: kdump: introduce "reset_devices" command line option
From: Vivek Goyal <vgoyal@xxxxxxxxxx>


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>
---

 Documentation/kernel-parameters.txt |    3 +++
 include/linux/init.h                |    1 +
 init/main.c                         |   20 ++++++++++++++++++++
 3 files changed, 24 insertions(+)

diff -puN Documentation/kernel-parameters.txt~kdump-introduce-reset_devices-command-line-option Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt~kdump-introduce-reset_devices-command-line-option
+++ a/Documentation/kernel-parameters.txt
@@ -1350,6 +1350,9 @@ running once the system is up.
 
 	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 -puN include/linux/init.h~kdump-introduce-reset_devices-command-line-option include/linux/init.h
--- a/include/linux/init.h~kdump-introduce-reset_devices-command-line-option
+++ a/include/linux/init.h
@@ -68,6 +68,7 @@ extern initcall_t __security_initcall_st
 
 /* 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 -puN init/main.c~kdump-introduce-reset_devices-command-line-option init/main.c
--- a/init/main.c~kdump-introduce-reset_devices-command-line-option
+++ a/init/main.c
@@ -134,6 +134,18 @@ dev_t ROOT_DEV;
 unsigned int real_root_dev;
 
 /*
+ * 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
@@ -159,6 +171,14 @@ static int __init maxcpus(char *str)
 
 __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;
_

Patches currently in -mm which might be from vgoyal@xxxxxxxxxx are

origin.patch
i2c-801-64bit-resource-fix.patch
powerpc-adding-the-use-of-the-firmware-soft-reset-nmi-to-kdump.patch
register-hot-added-memory-to-iomem-resource.patch
kdump-introduce-reset_devices-command-line-option.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux