Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git] / arch / sh / kernel / process.c
index e77feaf117abbb404cf43f5d200f44f2acaa6e27..9b7a459a4613d8573a7c84ac3bf970402431c31e 100644 (file)
@@ -13,8 +13,15 @@ unsigned long __stack_chk_guard __read_mostly;
 EXPORT_SYMBOL(__stack_chk_guard);
 #endif
 
+/*
+ * 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) {