mirror of
https://github.com/torvalds/linux
synced 2024-07-21 18:51:47 +00:00
arch: remove ARCH_TASK_STRUCT_ON_STACK
IA-64 was the only architecture which selected ARCH_TASK_STRUCT_ON_STACK. IA-64 was removed with commitcf8e865810
("arch: Remove Itanium (IA-64) architecture"). Therefore remove support for ARCH_TASK_STRUCT_ON_STACK as well. Note: this also reveals a potential bug in powerpc code, which makes use of __init_task_data without selecting ARCH_TASK_STRUCT_ON_STACK which makes __init_task_data a no-op. This is broken since commitd11ed3ab31
("Expand INIT_TASK() in init/init_task.c and remove") from 2018 and needs to be addressed separately. Link: https://lkml.kernel.org/r/20231116133638.1636277-4-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>
This commit is contained in:
parent
3888750e21
commit
0eb5085c38
|
@ -301,10 +301,6 @@ config ARCH_HAS_DMA_CLEAR_UNCACHED
|
||||||
config ARCH_HAS_CPU_FINALIZE_INIT
|
config ARCH_HAS_CPU_FINALIZE_INIT
|
||||||
bool
|
bool
|
||||||
|
|
||||||
# Select if arch init_task must go in the __init_task_data section
|
|
||||||
config ARCH_TASK_STRUCT_ON_STACK
|
|
||||||
bool
|
|
||||||
|
|
||||||
config HAVE_ARCH_THREAD_STRUCT_WHITELIST
|
config HAVE_ARCH_THREAD_STRUCT_WHITELIST
|
||||||
bool
|
bool
|
||||||
help
|
help
|
||||||
|
|
|
@ -283,8 +283,7 @@ static void kexec_prepare_cpus(void)
|
||||||
* We could use a smaller stack if we don't care about anything using
|
* We could use a smaller stack if we don't care about anything using
|
||||||
* current, but that audit has not been performed.
|
* current, but that audit has not been performed.
|
||||||
*/
|
*/
|
||||||
static union thread_union kexec_stack __init_task_data =
|
static union thread_union kexec_stack = { };
|
||||||
{ };
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For similar reasons to the stack above, the kexecing CPU needs to be on a
|
* For similar reasons to the stack above, the kexecing CPU needs to be on a
|
||||||
|
|
|
@ -37,13 +37,6 @@ extern struct cred init_cred;
|
||||||
|
|
||||||
#define INIT_TASK_COMM "swapper"
|
#define INIT_TASK_COMM "swapper"
|
||||||
|
|
||||||
/* Attach to the init_task data structure for proper alignment */
|
|
||||||
#ifdef CONFIG_ARCH_TASK_STRUCT_ON_STACK
|
|
||||||
#define __init_task_data __section(".data..init_task")
|
|
||||||
#else
|
|
||||||
#define __init_task_data /**/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Attach to the thread_info data structure for proper alignment */
|
/* Attach to the thread_info data structure for proper alignment */
|
||||||
#define __init_thread_info __section(".data..init_thread_info")
|
#define __init_thread_info __section(".data..init_thread_info")
|
||||||
|
|
||||||
|
|
|
@ -1955,9 +1955,7 @@ extern void ia64_set_curr_task(int cpu, struct task_struct *p);
|
||||||
void yield(void);
|
void yield(void);
|
||||||
|
|
||||||
union thread_union {
|
union thread_union {
|
||||||
#ifndef CONFIG_ARCH_TASK_STRUCT_ON_STACK
|
|
||||||
struct task_struct task;
|
struct task_struct task;
|
||||||
#endif
|
|
||||||
#ifndef CONFIG_THREAD_INFO_IN_TASK
|
#ifndef CONFIG_THREAD_INFO_IN_TASK
|
||||||
struct thread_info thread_info;
|
struct thread_info thread_info;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -51,8 +51,7 @@ static struct sighand_struct init_sighand = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_SHADOW_CALL_STACK
|
#ifdef CONFIG_SHADOW_CALL_STACK
|
||||||
unsigned long init_shadow_call_stack[SCS_SIZE / sizeof(long)]
|
unsigned long init_shadow_call_stack[SCS_SIZE / sizeof(long)] = {
|
||||||
__init_task_data = {
|
|
||||||
[(SCS_SIZE / sizeof(long)) - 1] = SCS_END_MAGIC
|
[(SCS_SIZE / sizeof(long)) - 1] = SCS_END_MAGIC
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -61,12 +60,7 @@ unsigned long init_shadow_call_stack[SCS_SIZE / sizeof(long)]
|
||||||
* Set up the first task table, touch at your own risk!. Base=0,
|
* Set up the first task table, touch at your own risk!. Base=0,
|
||||||
* limit=0x1fffff (=2MB)
|
* limit=0x1fffff (=2MB)
|
||||||
*/
|
*/
|
||||||
struct task_struct init_task
|
struct task_struct init_task __aligned(L1_CACHE_BYTES) = {
|
||||||
#ifdef CONFIG_ARCH_TASK_STRUCT_ON_STACK
|
|
||||||
__init_task_data
|
|
||||||
#endif
|
|
||||||
__aligned(L1_CACHE_BYTES)
|
|
||||||
= {
|
|
||||||
#ifdef CONFIG_THREAD_INFO_IN_TASK
|
#ifdef CONFIG_THREAD_INFO_IN_TASK
|
||||||
.thread_info = INIT_THREAD_INFO(init_task),
|
.thread_info = INIT_THREAD_INFO(init_task),
|
||||||
.stack_refcount = REFCOUNT_INIT(1),
|
.stack_refcount = REFCOUNT_INIT(1),
|
||||||
|
|
Loading…
Reference in a new issue