提交 4a34ed5c 编写于 作者: Y Yang Yingliang 提交者: Xie XiuQi

Revert "kexec: add kexec_device_shutdown()"

This reverts commit 3f5824d84929e058b82a0dcd28a6a8b13339cc00.
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 c9bef76b
......@@ -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 */
......
......@@ -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);
}
......
......@@ -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();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册