arm64: split thread_info from task stack
[linux-2.6-block.git] / arch / arm64 / include / asm / current.h
CommitLineData
c02433dd
MR
1#ifndef __ASM_CURRENT_H
2#define __ASM_CURRENT_H
3
4#include <linux/compiler.h>
5
6#include <asm/sysreg.h>
7
8#ifndef __ASSEMBLY__
9
10struct task_struct;
11
12static __always_inline struct task_struct *get_current(void)
13{
14 return (struct task_struct *)read_sysreg(sp_el0);
15}
16
17#define current get_current()
18
19#endif /* __ASSEMBLY__ */
20
21#endif /* __ASM_CURRENT_H */
22