aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/um/drivers/mconsole_kern.c6
-rw-r--r--arch/um/include/asm/processor-generic.h1
-rw-r--r--arch/um/kernel/process.c15
3 files changed, 4 insertions, 18 deletions
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index 3df3bd544492..29880c9b324e 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -645,11 +645,9 @@ void mconsole_sysrq(struct mc_request *req)
645 645
646static void stack_proc(void *arg) 646static void stack_proc(void *arg)
647{ 647{
648 struct task_struct *from = current, *to = arg; 648 struct task_struct *task = arg;
649 649
650 to->thread.saved_task = from; 650 show_stack(task, NULL);
651 rcu_user_hooks_switch(from, to);
652 switch_to(from, to, from);
653} 651}
654 652
655/* 653/*
diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/processor-generic.h
index 90469031297b..d89b02bb6262 100644
--- a/arch/um/include/asm/processor-generic.h
+++ b/arch/um/include/asm/processor-generic.h
@@ -19,7 +19,6 @@ struct task_struct;
19struct mm_struct; 19struct mm_struct;
20 20
21struct thread_struct { 21struct thread_struct {
22 struct task_struct *saved_task;
23 struct pt_regs regs; 22 struct pt_regs regs;
24 struct pt_regs *segv_regs; 23 struct pt_regs *segv_regs;
25 int singlestep_syscall; 24 int singlestep_syscall;
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index bbcef522bcb1..eecc4142764c 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -82,19 +82,8 @@ void *__switch_to(struct task_struct *from, struct task_struct *to)
82 to->thread.prev_sched = from; 82 to->thread.prev_sched = from;
83 set_current(to); 83 set_current(to);
84 84
85 do { 85 switch_threads(&from->thread.switch_buf, &to->thread.switch_buf);
86 current->thread.saved_task = NULL; 86 arch_switch_to(current);
87
88 switch_threads(&from->thread.switch_buf,
89 &to->thread.switch_buf);
90
91 arch_switch_to(current);
92
93 if (current->thread.saved_task)
94 show_regs(&(current->thread.regs));
95 to = current->thread.saved_task;
96 from = current;
97 } while (current->thread.saved_task);
98 87
99 return current->thread.prev_sched; 88 return current->thread.prev_sched;
100} 89}