diff options
author | Helge Deller <deller@gmx.de> | 2021-10-15 10:41:03 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2021-11-01 07:35:59 +0100 |
commit | 2214c0e77259b420402e279e9ab4277ef320d371 (patch) | |
tree | 2533ae4177d0ac79d41446b273e90243d30bd3e5 /arch/parisc/include/asm/current.h | |
parent | bc294838cc3443a2fbec58f8936ad4bd0a0b3055 (diff) | |
download | linux-2214c0e77259b420402e279e9ab4277ef320d371.tar.gz |
parisc: Move thread_info into task struct
This implements the CONFIG_THREAD_INFO_IN_TASK option.
With this change:
- before thread_info was part of the stack and located at the beginning of the stack
- now the thread_info struct is moved and located inside the task_struct structure
- the stack is allocated and handled like the major other platforms
- drop the cpu field of thread_info and use instead the one in task_struct
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Diffstat (limited to 'arch/parisc/include/asm/current.h')
-rw-r--r-- | arch/parisc/include/asm/current.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/parisc/include/asm/current.h b/arch/parisc/include/asm/current.h new file mode 100644 index 000000000000..568b739e42af --- /dev/null +++ b/arch/parisc/include/asm/current.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_PARISC_CURRENT_H +#define _ASM_PARISC_CURRENT_H + +#include <asm/special_insns.h> + +#ifndef __ASSEMBLY__ +struct task_struct; + +static __always_inline struct task_struct *get_current(void) +{ + return (struct task_struct *) mfctl(30); +} + +#define current get_current() + +#endif /* __ASSEMBLY__ */ + +#endif /* _ASM_PARISC_CURRENT_H */ |