Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arch: remove ARCH_THREAD_STACK_ALLOCATOR

Patch series "Remove unused code after IA-64 removal".

While looking into something different I noticed that there are a couple
of Kconfig options which were only selected by IA-64 and which are now
unused.

So remove them and simplify the code a bit.


This patch (of 3):

IA-64 was the only architecture which selected ARCH_THREAD_STACK_ALLOCATOR.
IA-64 was removed with commit cf8e8658100d ("arch: Remove Itanium (IA-64)
architecture"). Therefore remove support for ARCH_THREAD_STACK_ALLOCATOR as
well.

Link: https://lkml.kernel.org/r/20231116133638.1636277-1-hca@linux.ibm.com
Link: https://lkml.kernel.org/r/20231116133638.1636277-2-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Heiko Carstens and committed by
Andrew Morton
f72709ab 2f0eff20

-24
-4
arch/Kconfig
··· 320 320 should be implemented. Without this, the entire thread_struct 321 321 field in task_struct will be left whitelisted. 322 322 323 - # Select if arch has its private alloc_thread_stack() function 324 - config ARCH_THREAD_STACK_ALLOCATOR 325 - bool 326 - 327 323 # Select if arch wants to size task_struct dynamically via arch_task_struct_size: 328 324 config ARCH_WANTS_DYNAMIC_TASK_STRUCT 329 325 bool
-20
kernel/fork.c
··· 179 179 } 180 180 #endif 181 181 182 - #ifndef CONFIG_ARCH_THREAD_STACK_ALLOCATOR 183 - 184 182 /* 185 183 * Allocate pages if THREAD_SIZE is >= PAGE_SIZE, otherwise use a 186 184 * kmemcache based allocator. ··· 410 412 } 411 413 412 414 # endif /* THREAD_SIZE >= PAGE_SIZE || defined(CONFIG_VMAP_STACK) */ 413 - #else /* CONFIG_ARCH_THREAD_STACK_ALLOCATOR */ 414 - 415 - static int alloc_thread_stack_node(struct task_struct *tsk, int node) 416 - { 417 - unsigned long *stack; 418 - 419 - stack = arch_alloc_thread_stack_node(tsk, node); 420 - tsk->stack = stack; 421 - return stack ? 0 : -ENOMEM; 422 - } 423 - 424 - static void free_thread_stack(struct task_struct *tsk) 425 - { 426 - arch_free_thread_stack(tsk); 427 - tsk->stack = NULL; 428 - } 429 - 430 - #endif /* !CONFIG_ARCH_THREAD_STACK_ALLOCATOR */ 431 415 432 416 /* SLAB cache for signal_struct structures (tsk->signal) */ 433 417 static struct kmem_cache *signal_cachep;