linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / um / kernel / process_kern.c
index 6a0804f..3113cab 100644 (file)
@@ -4,6 +4,7 @@
  * Licensed under the GPL
  */
 
+#include "linux/config.h"
 #include "linux/kernel.h"
 #include "linux/sched.h"
 #include "linux/interrupt.h"
@@ -155,25 +156,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
                unsigned long stack_top, struct task_struct * p, 
                struct pt_regs *regs)
 {
-       int ret;
-
        p->thread = (struct thread_struct) INIT_THREAD;
-       ret = CHOOSE_MODE_PROC(copy_thread_tt, copy_thread_skas, nr,
-                               clone_flags, sp, stack_top, p, regs);
-
-       if (ret || !current->thread.forking)
-               goto out;
-
-       clear_flushed_tls(p);
-
-       /*
-        * Set a new TLS for the child thread?
-        */
-       if (clone_flags & CLONE_SETTLS)
-               ret = arch_copy_tls(p);
-
-out:
-       return ret;
+       return(CHOOSE_MODE_PROC(copy_thread_tt, copy_thread_skas, nr, 
+                               clone_flags, sp, stack_top, p, regs));
 }
 
 void initial_thread_cb(void (*proc)(void *), void *arg)
@@ -200,6 +185,10 @@ void default_idle(void)
 {
        CHOOSE_MODE(uml_idle_timer(), (void) 0);
 
+       atomic_inc(&init_mm.mm_count);
+       current->mm = &init_mm;
+       current->active_mm = &init_mm;
+
        while(1){
                /* endless idle loop with no priority at all */
 
@@ -418,7 +407,7 @@ static int proc_read_sysemu(char *buf, char **start, off_t offset, int size,int
        return strlen(buf);
 }
 
-static int proc_write_sysemu(struct file *file,const char __user *buf, unsigned long count,void *data)
+static int proc_write_sysemu(struct file *file,const char *buf, unsigned long count,void *data)
 {
        char tmp[2];