diff options
author | Jeff Dike <jdike@addtoit.com> | 2005-09-16 22:27:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-17 14:49:59 -0400 |
commit | f6e34c6af6f18bd6c66bfb1c6a7c57068412aa73 (patch) | |
tree | 45aebccc135b870a5aff5dcf975325171c7bf891 /arch/um/kernel/skas | |
parent | 6add9f7f529b124938d14ae9db5a952d1272075a (diff) |
[PATCH] uml: _switch_to code consolidation
This patch moves code that is in both switch_to_tt and switch_to_skas to the
top level _switch_to function, keeping us from duplicating code. It is
required for the stack trace patch to work properly.
Signed-off-by: Allan Graves <allan.graves@gmail.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/skas')
-rw-r--r-- | arch/um/kernel/skas/include/mode_kern-skas.h | 2 | ||||
-rw-r--r-- | arch/um/kernel/skas/process_kern.c | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/arch/um/kernel/skas/include/mode_kern-skas.h b/arch/um/kernel/skas/include/mode_kern-skas.h index e48490028111..c97a80dfe370 100644 --- a/arch/um/kernel/skas/include/mode_kern-skas.h +++ b/arch/um/kernel/skas/include/mode_kern-skas.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include "asm/ptrace.h" | 11 | #include "asm/ptrace.h" |
12 | 12 | ||
13 | extern void flush_thread_skas(void); | 13 | extern void flush_thread_skas(void); |
14 | extern void *switch_to_skas(void *prev, void *next); | 14 | extern void switch_to_skas(void *prev, void *next); |
15 | extern void start_thread_skas(struct pt_regs *regs, unsigned long eip, | 15 | extern void start_thread_skas(struct pt_regs *regs, unsigned long eip, |
16 | unsigned long esp); | 16 | unsigned long esp); |
17 | extern int copy_thread_skas(int nr, unsigned long clone_flags, | 17 | extern int copy_thread_skas(int nr, unsigned long clone_flags, |
diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c index 3d1b227226e6..efe92e8aa2a9 100644 --- a/arch/um/kernel/skas/process_kern.c +++ b/arch/um/kernel/skas/process_kern.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "proc_mm.h" | 24 | #include "proc_mm.h" |
25 | #include "registers.h" | 25 | #include "registers.h" |
26 | 26 | ||
27 | void *switch_to_skas(void *prev, void *next) | 27 | void switch_to_skas(void *prev, void *next) |
28 | { | 28 | { |
29 | struct task_struct *from, *to; | 29 | struct task_struct *from, *to; |
30 | 30 | ||
@@ -35,16 +35,11 @@ void *switch_to_skas(void *prev, void *next) | |||
35 | if(current->pid == 0) | 35 | if(current->pid == 0) |
36 | switch_timers(0); | 36 | switch_timers(0); |
37 | 37 | ||
38 | to->thread.prev_sched = from; | ||
39 | set_current(to); | ||
40 | |||
41 | switch_threads(&from->thread.mode.skas.switch_buf, | 38 | switch_threads(&from->thread.mode.skas.switch_buf, |
42 | to->thread.mode.skas.switch_buf); | 39 | to->thread.mode.skas.switch_buf); |
43 | 40 | ||
44 | if(current->pid == 0) | 41 | if(current->pid == 0) |
45 | switch_timers(1); | 42 | switch_timers(1); |
46 | |||
47 | return(current->thread.prev_sched); | ||
48 | } | 43 | } |
49 | 44 | ||
50 | extern void schedule_tail(struct task_struct *prev); | 45 | extern void schedule_tail(struct task_struct *prev); |