aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-23 00:25:15 -0400
committerRichard Weinberger <richard@nod.at>2012-08-01 18:25:44 -0400
commitb8a420952336ed81ef5c9bf8bad90d3deaee5521 (patch)
tree91134cb8f8a69b9243ac98fe08e8f92eadc3954a /arch/um
parent1bfa2317b21750f739b59ab6df2c8efb12875045 (diff)
um: pull interrupt_end() into userspace()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/kernel/process.c11
-rw-r--r--arch/um/os-Linux/skas/process.c3
2 files changed, 6 insertions, 8 deletions
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index f19ca6152460..57fc7028714a 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -151,12 +151,10 @@ void new_thread_handler(void)
151 * 0 if it just exits 151 * 0 if it just exits
152 */ 152 */
153 n = run_kernel_thread(fn, arg, &current->thread.exec_buf); 153 n = run_kernel_thread(fn, arg, &current->thread.exec_buf);
154 if (n == 1) { 154 if (n == 1)
155 /* Handle any immediate reschedules or signals */
156 interrupt_end();
157 userspace(&current->thread.regs.regs); 155 userspace(&current->thread.regs.regs);
158 } 156 else
159 else do_exit(0); 157 do_exit(0);
160} 158}
161 159
162/* Called magically, see new_thread_handler above */ 160/* Called magically, see new_thread_handler above */
@@ -175,9 +173,6 @@ void fork_handler(void)
175 173
176 current->thread.prev_sched = NULL; 174 current->thread.prev_sched = NULL;
177 175
178 /* Handle any immediate reschedules or signals */
179 interrupt_end();
180
181 userspace(&current->thread.regs.regs); 176 userspace(&current->thread.regs.regs);
182} 177}
183 178
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index cd65727854eb..2687f1f3a709 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -347,6 +347,9 @@ void userspace(struct uml_pt_regs *regs)
347 /* To prevent races if using_sysemu changes under us.*/ 347 /* To prevent races if using_sysemu changes under us.*/
348 int local_using_sysemu; 348 int local_using_sysemu;
349 349
350 /* Handle any immediate reschedules or signals */
351 interrupt_end();
352
350 if (getitimer(ITIMER_VIRTUAL, &timer)) 353 if (getitimer(ITIMER_VIRTUAL, &timer))
351 printk(UM_KERN_ERR "Failed to get itimer, errno = %d\n", errno); 354 printk(UM_KERN_ERR "Failed to get itimer, errno = %d\n", errno);
352 nsecs = timer.it_value.tv_sec * UM_NSEC_PER_SEC + 355 nsecs = timer.it_value.tv_sec * UM_NSEC_PER_SEC +