summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/current.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/current.h')
-rw-r--r--include/asm-mips/current.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-mips/current.h b/include/asm-mips/current.h
index 743f91902..7d1547b3c 100644
--- a/include/asm-mips/current.h
+++ b/include/asm-mips/current.h
@@ -29,6 +29,20 @@ static inline struct task_struct *__get_current(void)
ori reg, 8191; \
xori reg, 8191
+/*
+ * Special variant for use by exception handlers when the stack pointer
+ * is not loaded.
+ */
+#define _GET_CURRENT(reg) \
+ lui reg, %hi(kernelsp); \
+ .set push; \
+ .set noreorder; \
+ lw reg, %lo(kernelsp)(reg); \
+ .set pop; \
+ ori reg, 8191; \
+ xori reg, 8191
+
+
#endif
#endif /* __ASM_MIPS_CURRENT_H */