summaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm/current.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/include/asm/current.h')
-rw-r--r--arch/riscv/include/asm/current.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/riscv/include/asm/current.h b/arch/riscv/include/asm/current.h
index 1de233d8e8de..ba5aa72aff63 100644
--- a/arch/riscv/include/asm/current.h
+++ b/arch/riscv/include/asm/current.h
@@ -13,7 +13,7 @@
#include <linux/bug.h>
#include <linux/compiler.h>
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
struct task_struct;
@@ -33,6 +33,8 @@ static __always_inline struct task_struct *get_current(void)
#define current get_current()
-#endif /* __ASSEMBLY__ */
+register unsigned long current_stack_pointer __asm__("sp");
+
+#endif /* __ASSEMBLER__ */
#endif /* _ASM_RISCV_CURRENT_H */