summaryrefslogtreecommitdiff
path: root/arch/nds32/include/asm/current.h
diff options
context:
space:
mode:
authorGreentime Hu <greentime@andestech.com>2017-10-24 15:47:50 +0800
committerGreentime Hu <greentime@andestech.com>2018-02-22 10:44:32 +0800
commita15e9ffa877852e529db33cc615c132bad2fc60a (patch)
treec6a8f4eb446a368a79327835de1051031327e3d2 /arch/nds32/include/asm/current.h
parent7de9cf474083bfbba469f72dc208f7b51747632d (diff)
nds32: Process management
This patch includes copy_thread(), start_thread() implementation and cpu_context structure definition. nds32 uses $r25 to get current task_struct. Signed-off-by: Vincent Chen <vincentc@andestech.com> Signed-off-by: Greentime Hu <greentime@andestech.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/nds32/include/asm/current.h')
-rw-r--r--arch/nds32/include/asm/current.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/nds32/include/asm/current.h b/arch/nds32/include/asm/current.h
new file mode 100644
index 000000000000..b4dcd22b7bcb
--- /dev/null
+++ b/arch/nds32/include/asm/current.h
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0
+// Copyright (C) 2005-2017 Andes Technology Corporation
+
+#ifndef _ASM_NDS32_CURRENT_H
+#define _ASM_NDS32_CURRENT_H
+
+#ifndef __ASSEMBLY__
+register struct task_struct *current asm("$r25");
+#endif /* __ASSEMBLY__ */
+#define tsk $r25
+
+#endif /* _ASM_NDS32_CURRENT_H */