[PATCH] uml: implement {get,set}_thread_area for i386
[firefly-linux-kernel-4.4.55.git] / arch / um / kernel / skas / process_kern.c
index 3f70a2e12f067504f48243a204190ff2eff44027..38b185370c4226a27fbf0d5c27d2f89c1b4000b8 100644 (file)
@@ -35,6 +35,8 @@ void switch_to_skas(void *prev, void *next)
        switch_threads(&from->thread.mode.skas.switch_buf,
                       to->thread.mode.skas.switch_buf);
 
+       arch_switch_to_skas(current->thread.prev_sched, current);
+
        if(current->pid == 0)
                switch_timers(1);
 }
@@ -109,6 +111,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);