diff options
Diffstat (limited to 'arch/parisc/include/asm/current.h')
| -rw-r--r-- | arch/parisc/include/asm/current.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/arch/parisc/include/asm/current.h b/arch/parisc/include/asm/current.h index 0fb9338e3bf2..2814529a4c28 100644 --- a/arch/parisc/include/asm/current.h +++ b/arch/parisc/include/asm/current.h @@ -1,15 +1,21 @@ -#ifndef _PARISC_CURRENT_H -#define _PARISC_CURRENT_H - -#include <linux/thread_info.h> +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_PARISC_CURRENT_H +#define _ASM_PARISC_CURRENT_H +#ifndef __ASSEMBLER__ struct task_struct; -static inline struct task_struct * get_current(void) +static __always_inline struct task_struct *get_current(void) { - return current_thread_info()->task; + struct task_struct *ts; + + /* do not use mfctl() macro as it is marked volatile */ + asm( "mfctl %%cr30,%0" : "=r" (ts) ); + return ts; } - + #define current get_current() -#endif /* !(_PARISC_CURRENT_H) */ +#endif /* __ASSEMBLER__ */ + +#endif /* _ASM_PARISC_CURRENT_H */ |
