mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
fork, IA64: Provide alloc_thread_stack_node() for IA64
Provide a generic alloc_thread_stack_node() for IA64 and CONFIG_ARCH_THREAD_STACK_ALLOCATOR which returns stack pointer and sets task_struct::stack so it behaves exactly like the other implementations. Rename IA64's alloc_thread_stack_node() and add the generic version to the fork code so it is in one place _and_ to drastically lower the chances of fat fingering the IA64 code. Do the same for free_thread_stack(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Andy Lutomirski <luto@kernel.org> Link: https://lore.kernel.org/r/20220217102406.3697941-4-bigeasy@linutronix.de
This commit is contained in:
committed by
Thomas Gleixner
parent
546c42b2c5
commit
2bb0529c0b
@@ -330,6 +330,23 @@ void thread_stack_cache_init(void)
|
||||
}
|
||||
|
||||
# endif /* THREAD_SIZE >= PAGE_SIZE || defined(CONFIG_VMAP_STACK) */
|
||||
#else /* CONFIG_ARCH_THREAD_STACK_ALLOCATOR */
|
||||
|
||||
static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node)
|
||||
{
|
||||
unsigned long *stack;
|
||||
|
||||
stack = arch_alloc_thread_stack_node(tsk, node);
|
||||
tsk->stack = stack;
|
||||
return stack;
|
||||
}
|
||||
|
||||
static void free_thread_stack(struct task_struct *tsk)
|
||||
{
|
||||
arch_free_thread_stack(tsk);
|
||||
tsk->stack = NULL;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_ARCH_THREAD_STACK_ALLOCATOR */
|
||||
|
||||
/* SLAB cache for signal_struct structures (tsk->signal) */
|
||||
|
Reference in New Issue
Block a user