Merge branch 'upstream'
[powerpc.git] / arch / um / kernel / skas / process_kern.c
index 14360ac..2135eaf 100644 (file)
@@ -91,10 +91,17 @@ void fork_handler(int sig)
                panic("blech");
 
        schedule_tail(current->thread.prev_sched);
+
+       /* XXX: if interrupt_end() calls schedule, this call to
+        * arch_switch_to_skas isn't needed. We could want to apply this to
+        * improve performance. -bb */
+       arch_switch_to_skas(current->thread.prev_sched, current);
+
        current->thread.prev_sched = NULL;
 
 /* Handle any immediate reschedules or signals */
        interrupt_end();
+
        userspace(&current->thread.regs.regs);
 }
 
@@ -111,6 +118,8 @@ int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp,
                if(sp != 0) REGS_SP(p->thread.regs.regs.skas.regs) = sp;
 
                handler = fork_handler;
+
+               arch_copy_thread(&current->thread.arch, &p->thread.arch);
        }
        else {
                init_thread_registers(&p->thread.regs.regs);