summaryrefslogtreecommitdiff
path: root/arch/nds32/include/asm/processor.h
diff options
context:
space:
mode:
authorVincent Chen <vincentc@andestech.com>2018-11-22 06:14:34 +0300
committerGreentime Hu <greentime@andestech.com>2018-11-22 13:13:13 +0300
commite46bf83c1864a20f9dd17d597ec9be18ed05add8 (patch)
treeb790f6d6935256140cb8e02d9a5dffd64ad74d14 /arch/nds32/include/asm/processor.h
parent4f014a41b4efd72cbefb5525372dfcd65162eb4e (diff)
downloadlinux-e46bf83c1864a20f9dd17d597ec9be18ed05add8.tar.xz
nds32: nds32 FPU port
This patch set contains basic components for supporting the nds32 FPU, such as exception handlers and context switch for FPU registers. By default, the lazy FPU scheme is supported and the user can configure it via CONFIG_LZAY_FPU. Signed-off-by: Vincent Chen <vincentc@andestech.com> Acked-by: Greentime Hu <greentime@andestech.com> Signed-off-by: Greentime Hu <greentime@andestech.com>
Diffstat (limited to 'arch/nds32/include/asm/processor.h')
-rw-r--r--arch/nds32/include/asm/processor.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/nds32/include/asm/processor.h b/arch/nds32/include/asm/processor.h
index c2660f566bac..72024f8bc129 100644
--- a/arch/nds32/include/asm/processor.h
+++ b/arch/nds32/include/asm/processor.h
@@ -35,6 +35,8 @@ struct thread_struct {
unsigned long address;
unsigned long trap_no;
unsigned long error_code;
+
+ struct fpu_struct fpu;
};
#define INIT_THREAD { }
@@ -72,6 +74,11 @@ struct task_struct;
/* Free all resources held by a thread. */
#define release_thread(thread) do { } while(0)
+#if IS_ENABLED(CONFIG_FPU)
+#if !IS_ENABLED(CONFIG_UNLAZU_FPU)
+extern struct task_struct *last_task_used_math;
+#endif
+#endif
/* Prepare to copy thread state - unlazy all lazy status */
#define prepare_to_copy(tsk) do { } while (0)