]>
git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blob - arch/powerpc/include/asm/current.h
297827b761697a9f6a284fa2d7720382212aa17a
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 #ifndef _ASM_POWERPC_CURRENT_H
3 #define _ASM_POWERPC_CURRENT_H
12 #include <linux/stddef.h>
15 static inline struct task_struct
*get_current(void)
17 struct task_struct
*task
;
19 __asm__
__volatile__("ld %0,%1(13)"
21 : "i" (offsetof(struct paca_struct
, __current
)));
25 #define current get_current()
30 * We keep `current' in r2 for speed.
32 register struct task_struct
*current
asm ("r2");
36 #endif /* __KERNEL__ */
37 #endif /* _ASM_POWERPC_CURRENT_H */