fork: move the real prepare_to_copy() users to arch_dup_task_struct()
[linux-2.6-block.git] / arch / sh / kernel / process.c
index 325f98b1736d4a1ab8fdc93f54bcd7cb3674d298..2bde59eae10d70c698d11857fbfecb03243e3be8 100644 (file)
@@ -6,8 +6,15 @@
 struct kmem_cache *task_xstate_cachep = NULL;
 unsigned int xstate_size;
 
+/*
+ * this gets called so that we can store lazy state into memory and copy the
+ * current task into the new thread.
+ */
 int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
 {
+#ifdef CONFIG_SUPERH32
+       unlazy_fpu(src, task_pt_regs(src));
+#endif
        *dst = *src;
 
        if (src->thread.xstate) {