1 #ifndef __ASM_CURRENT_H
2 #define __ASM_CURRENT_H
4 #include <linux/compiler.h>
11 * We don't use read_sysreg() as we want the compiler to cache the value where
14 static __always_inline struct task_struct *get_current(void)
18 asm ("mrs %0, sp_el0" : "=r" (sp_el0));
20 return (struct task_struct *)sp_el0;
23 #define current get_current()
25 #endif /* __ASSEMBLY__ */
27 #endif /* __ASM_CURRENT_H */