diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 2c238921aa603e578949695f9c5a070f70929d4a..9e4e638fb5051b1337718535db5ae20b7a63c07c 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h @@ -275,7 +275,6 @@ int kexec_should_crash(struct task_struct *); int kexec_crash_loaded(void); void crash_save_cpu(struct pt_regs *regs, int cpu); extern int kimage_crash_copy_vmcoreinfo(struct kimage *image); -extern void kexec_device_shutdown(void); extern struct kimage *kexec_image; extern struct kimage *kexec_crash_image; @@ -365,7 +364,6 @@ static inline void __crash_kexec(struct pt_regs *regs) { } static inline void crash_kexec(struct pt_regs *regs) { } static inline int kexec_should_crash(struct task_struct *p) { return 0; } static inline int kexec_crash_loaded(void) { return 0; } -static inline void kexec_device_shutdown(void) { }; #define kexec_in_progress false #endif /* CONFIG_KEXEC_CORE */ diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index dff78963954453ef7c7c80486c93ad0e2356857c..23a83a4da38a1dffc5203c828a384531b6cce9b2 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -923,39 +923,6 @@ struct kimage *kexec_image; struct kimage *kexec_crash_image; int kexec_load_disabled; -void kexec_device_shutdown(void) -{ - int len; - char *p = saved_command_line; - - p = strstr(p, "kexec_shutdown_device="); - if (p) { - int i; - char c; - char drv_name[128]; - - memset(drv_name, 0, 128); - p += strlen("kexec_shutdown_device="); - c = *p; - i = 0; - while (c != '\0' && c != ' ') { - if (c != '\\' && i < 127) { - drv_name[i] = c; - i++; - } else if (drv_name[0] != '\0') { - pr_info("drv name:%s\n", drv_name); - device_shutdown_by_driver(drv_name); - memset(drv_name, 0, 128); - i = 0; - } - p++; - c = *p; - } - if (drv_name[0] != '\0') - device_shutdown_by_driver(drv_name); - } -} - /* * No panic_cpu check version of crash_kexec(). This function is called * only when panic_cpu holds the current CPU number; this is the only CPU @@ -977,8 +944,6 @@ void __noclone __crash_kexec(struct pt_regs *regs) crash_setup_regs(&fixed_regs, regs); crash_save_vmcoreinfo(); - if (!crash_kexec_post_notifiers) - kexec_device_shutdown(); machine_crash_shutdown(&fixed_regs); machine_kexec(kexec_crash_image); } diff --git a/kernel/panic.c b/kernel/panic.c index 767f004045b24c717b9e796d02f669e43649e4c5..6a6df23acd1a5144ecf307d848813ea6618d8f19 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -209,7 +209,6 @@ void panic(const char *fmt, ...) * kmsg_dump, we will need architecture dependent extra * works in addition to stopping other CPUs. */ - kexec_device_shutdown(); crash_smp_send_stop(); }