diff options
Diffstat (limited to 'arch/um/kernel/skas/process_kern.c')
-rw-r--r-- | arch/um/kernel/skas/process_kern.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c index 3f70a2e12f06..2135eaf98a93 100644 --- a/arch/um/kernel/skas/process_kern.c +++ b/arch/um/kernel/skas/process_kern.c | |||
@@ -35,6 +35,8 @@ void switch_to_skas(void *prev, void *next) | |||
35 | switch_threads(&from->thread.mode.skas.switch_buf, | 35 | switch_threads(&from->thread.mode.skas.switch_buf, |
36 | to->thread.mode.skas.switch_buf); | 36 | to->thread.mode.skas.switch_buf); |
37 | 37 | ||
38 | arch_switch_to_skas(current->thread.prev_sched, current); | ||
39 | |||
38 | if(current->pid == 0) | 40 | if(current->pid == 0) |
39 | switch_timers(1); | 41 | switch_timers(1); |
40 | } | 42 | } |
@@ -89,10 +91,17 @@ void fork_handler(int sig) | |||
89 | panic("blech"); | 91 | panic("blech"); |
90 | 92 | ||
91 | schedule_tail(current->thread.prev_sched); | 93 | schedule_tail(current->thread.prev_sched); |
94 | |||
95 | /* XXX: if interrupt_end() calls schedule, this call to | ||
96 | * arch_switch_to_skas isn't needed. We could want to apply this to | ||
97 | * improve performance. -bb */ | ||
98 | arch_switch_to_skas(current->thread.prev_sched, current); | ||
99 | |||
92 | current->thread.prev_sched = NULL; | 100 | current->thread.prev_sched = NULL; |
93 | 101 | ||
94 | /* Handle any immediate reschedules or signals */ | 102 | /* Handle any immediate reschedules or signals */ |
95 | interrupt_end(); | 103 | interrupt_end(); |
104 | |||
96 | userspace(¤t->thread.regs.regs); | 105 | userspace(¤t->thread.regs.regs); |
97 | } | 106 | } |
98 | 107 | ||
@@ -109,6 +118,8 @@ int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp, | |||
109 | if(sp != 0) REGS_SP(p->thread.regs.regs.skas.regs) = sp; | 118 | if(sp != 0) REGS_SP(p->thread.regs.regs.skas.regs) = sp; |
110 | 119 | ||
111 | handler = fork_handler; | 120 | handler = fork_handler; |
121 | |||
122 | arch_copy_thread(¤t->thread.arch, &p->thread.arch); | ||
112 | } | 123 | } |
113 | else { | 124 | else { |
114 | init_thread_registers(&p->thread.regs.regs); | 125 | init_thread_registers(&p->thread.regs.regs); |