um: Get rid of thread_struct->saved_task
authorRichard Weinberger <richard@nod.at>
Mon, 23 Sep 2013 15:38:03 +0000 (17:38 +0200)
committerRichard Weinberger <richard@nod.at>
Sun, 17 Nov 2013 10:27:35 +0000 (11:27 +0100)
As we have a sane show_stack() now, we can drop
the ->saved_task hack.

Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/mconsole_kern.c
arch/um/include/asm/processor-generic.h
arch/um/kernel/process.c

index 3df3bd544492012ab9b78b0c43ab2648a1760e61..29880c9b324ed33601c8af02340a4765d9d75b3b 100644 (file)
@@ -645,11 +645,9 @@ void mconsole_sysrq(struct mc_request *req)
 
 static void stack_proc(void *arg)
 {
-       struct task_struct *from = current, *to = arg;
+       struct task_struct *task = arg;
 
-       to->thread.saved_task = from;
-       rcu_user_hooks_switch(from, to);
-       switch_to(from, to, from);
+       show_stack(task, NULL);
 }
 
 /*
index 90469031297bbdaa183bc24d11efb5b709a8592d..d89b02bb6262d2bd34f21a96f8ec8f3845b5cd8c 100644 (file)
@@ -19,7 +19,6 @@ struct task_struct;
 struct mm_struct;
 
 struct thread_struct {
-       struct task_struct *saved_task;
        struct pt_regs regs;
        struct pt_regs *segv_regs;
        int singlestep_syscall;
index bbcef522bcb18ad468fcb4c0d7738010b5e667ed..eecc4142764c7328108a76f5d02126281c44f845 100644 (file)
@@ -82,19 +82,8 @@ void *__switch_to(struct task_struct *from, struct task_struct *to)
        to->thread.prev_sched = from;
        set_current(to);
 
-       do {
-               current->thread.saved_task = NULL;
-
-               switch_threads(&from->thread.switch_buf,
-                              &to->thread.switch_buf);
-
-               arch_switch_to(current);
-
-               if (current->thread.saved_task)
-                       show_regs(&(current->thread.regs));
-               to = current->thread.saved_task;
-               from = current;
-       } while (current->thread.saved_task);
+       switch_threads(&from->thread.switch_buf, &to->thread.switch_buf);
+       arch_switch_to(current);
 
        return current->thread.prev_sched;
 }