fork: move the real prepare_to_copy() users to arch_dup_task_struct()
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / xtensa / kernel / process.c
index 6a2d6edf8f728af36bf4da4fc1587e79057bdf46..9b306e550e3f06ddfa342c041c7793543702c4b3 100644 (file)
@@ -140,13 +140,16 @@ void flush_thread(void)
 }
 
 /*
- * This is called before the thread is copied. 
+ * this gets called so that we can store coprocessor state into memory and
+ * copy the current task into the new thread.
  */
-void prepare_to_copy(struct task_struct *tsk)
+int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
 {
 #if XTENSA_HAVE_COPROCESSORS
-       coprocessor_flush_all(task_thread_info(tsk));
+       coprocessor_flush_all(task_thread_info(src));
 #endif
+       *dst = *src;
+       return 0;
 }
 
 /*