167754Smsmith/* SPDX-License-Identifier: GPL-2.0 */
267754Smsmith#ifndef _ASM_PARISC_CURRENT_H
367754Smsmith#define _ASM_PARISC_CURRENT_H
477424Smsmith
577424Smsmith#ifndef __ASSEMBLY__
677424Smsmithstruct task_struct;
767754Smsmith
867754Smsmithstatic __always_inline struct task_struct *get_current(void)
967754Smsmith{
1067754Smsmith	struct task_struct *ts;
1167754Smsmith
1267754Smsmith	/* do not use mfctl() macro as it is marked volatile */
1367754Smsmith	asm( "mfctl %%cr30,%0" : "=r" (ts) );
1467754Smsmith	return ts;
1591116Smsmith}
1670243Smsmith
1767754Smsmith#define current get_current()
1867754Smsmith
1967754Smsmith#endif /* __ASSEMBLY__ */
2067754Smsmith
2167754Smsmith#endif /* _ASM_PARISC_CURRENT_H */
2267754Smsmith