Skip to content

Commit a1850e9

Browse files
um: Get rid of thread_struct->saved_task
As we have a sane show_stack() now, we can drop the ->saved_task hack. Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent f72c22e commit a1850e9

3 files changed

Lines changed: 4 additions & 18 deletions

File tree

‎arch/um/drivers/mconsole_kern.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -645,11 +645,9 @@ void mconsole_sysrq(struct mc_request *req)
645645

646646
static void stack_proc(void *arg)
647647
{
648-
struct task_struct *from = current, *to = arg;
648+
struct task_struct *task = arg;
649649

650-
to->thread.saved_task = from;
651-
rcu_user_hooks_switch(from, to);
652-
switch_to(from, to, from);
650+
show_stack(task, NULL);
653651
}
654652

655653
/*

‎arch/um/include/asm/processor-generic.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ struct task_struct;
1919
struct mm_struct;
2020

2121
struct thread_struct {
22-
struct task_struct *saved_task;
2322
struct pt_regs regs;
2423
struct pt_regs *segv_regs;
2524
int singlestep_syscall;

‎arch/um/kernel/process.c‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,8 @@ void *__switch_to(struct task_struct *from, struct task_struct *to)
8282
to->thread.prev_sched = from;
8383
set_current(to);
8484

85-
do {
86-
current->thread.saved_task = NULL;
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);
85+
switch_threads(&from->thread.switch_buf, &to->thread.switch_buf);
86+
arch_switch_to(current);
9887

9988
return current->thread.prev_sched;
10089
}

0 commit comments

Comments
 (0)