Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit49f9c35

Browse files
committed
Merge tag 'init_task-20180117' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
Pull init_task initializer cleanups from David Howells: "It doesn't seem useful to have the init_task in a header file rather than in a normal source file. We could consolidate init_task handling instead and expand out various macros. Here's a series of patches that consolidate init_task handling: (1) Make THREAD_SIZE available to vmlinux.lds for cris, hexagon and openrisc. (2) Alter the INIT_TASK_DATA linker script macro to set init_thread_union and init_stack rather than defining these in C. Insert init_task and init_thread_into into the init_stack area in the linker script as appropriate to the configuration, with different section markers so that they end up correctly ordered. We can then get merge ia64's init_task.c into the main one. We then have a bunch of single-use INIT_*() macros that seem only to be macros because they used to be used per-arch. We can then expand these in place of the user and get rid of a few lines and a lot of backslashes. (3) Expand INIT_TASK() in place. (4) Expand in place various small INIT_*() macros that are defined conditionally. Expand them and surround them by #if[n]def/#endif in the .c file as it takes fewer lines. (5) Expand INIT_SIGNALS() and INIT_SIGHAND() in place. (6) Expand INIT_STRUCT_PID in place. These macros can then be discarded"* tag 'init_task-20180117' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: Expand INIT_STRUCT_PID and remove Expand the INIT_SIGNALS and INIT_SIGHAND macros and remove Expand various INIT_* macros and remove Expand INIT_TASK() in init/init_task.c and remove Construct init thread stack in the linker script rather than by union openrisc: Make THREAD_SIZE available to vmlinux.lds hexagon: Make THREAD_SIZE available to vmlinux.lds cris: Make THREAD_SIZE available to vmlinux.lds
2 parentsd8a5b80 +e1e871a commit49f9c35

File tree

57 files changed

+230
-431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+230
-431
lines changed

‎arch/Kconfig‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ config ARCH_HAS_FORTIFY_SOURCE
234234
config ARCH_HAS_SET_MEMORY
235235
bool
236236

237-
# Select if arch init_taskinitializer is different to init/init_task.c
238-
configARCH_INIT_TASK
237+
# Select if arch init_taskmust go in the __init_task_data section
238+
configARCH_TASK_STRUCT_ON_STACK
239239
bool
240240

241241
# Select if arch has its private alloc_task_struct() function

‎arch/alpha/include/asm/thread_info.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ struct thread_info {
3939
.preempt_count= INIT_PREEMPT_COUNT,\
4040
}
4141

42-
#defineinit_thread_info(init_thread_union.thread_info)
43-
#defineinit_stack(init_thread_union.stack)
44-
4542
/* How to get the thread information struct from C. */
4643
registerstructthread_info*__current_thread_info __asm__("$8");
4744
#definecurrent_thread_info() __current_thread_info

‎arch/arc/include/asm/thread_info.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ struct thread_info {
6262
.addr_limit = KERNEL_DS,\
6363
}
6464

65-
#defineinit_thread_info (init_thread_union.thread_info)
66-
#defineinit_stack (init_thread_union.stack)
67-
6865
staticinline__attribute_const__structthread_info*current_thread_info(void)
6966
{
7067
registerunsigned longsp asm("sp");

‎arch/arm/include/asm/thread_info.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ struct thread_info {
7575
.addr_limit= KERNEL_DS,\
7676
}
7777

78-
#defineinit_thread_info(init_thread_union.thread_info)
79-
#defineinit_stack(init_thread_union.stack)
80-
8178
/*
8279
* how to get the current stack pointer in C
8380
*/

‎arch/arm64/include/asm/thread_info.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ struct thread_info {
5151
.addr_limit= KERNEL_DS,\
5252
}
5353

54-
#defineinit_stack(init_thread_union.stack)
55-
5654
#definethread_saved_pc(tsk)\
5755
((unsigned long)(tsk->thread.cpu_context.pc))
5856
#definethread_saved_sp(tsk)\

‎arch/blackfin/include/asm/thread_info.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ struct thread_info {
5656
.cpu= 0,\
5757
.preempt_count= INIT_PREEMPT_COUNT,\
5858
}
59-
#defineinit_thread_info(init_thread_union.thread_info)
60-
#defineinit_stack(init_thread_union.stack)
6159

6260
/* Given a task stack pointer, you can find its corresponding
6361
* thread_info structure just by masking it to the THREAD_SIZE

‎arch/c6x/include/asm/thread_info.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ struct thread_info {
6060
.addr_limit= KERNEL_DS,\
6161
}
6262

63-
#defineinit_thread_info(init_thread_union.thread_info)
64-
#defineinit_stack(init_thread_union.stack)
65-
6663
/* get the thread information struct of current task */
6764
staticinline __attribute__((const))
6865
structthread_info*current_thread_info(void)

‎arch/cris/include/asm/processor.h‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ struct task_struct;
2626
*/
2727
#defineTASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
2828

29-
/* THREAD_SIZE is the size of the thread_info/kernel_stack combo.
30-
* normally, the stack is found by doing something like p + THREAD_SIZE
31-
* in CRIS, a page is 8192 bytes, which seems like a sane size
32-
*/
33-
#defineTHREAD_SIZE PAGE_SIZE
34-
#defineTHREAD_SIZE_ORDER (0)
35-
3629
/*
3730
* At user->kernel entry, the pt_regs struct is stacked on the top of the kernel-stack.
3831
* This macro allows us to find those regs for a task.
@@ -59,8 +52,6 @@ static inline void release_thread(struct task_struct *dead_task)
5952
/* Nothing needs to be done. */
6053
}
6154

62-
#defineinit_stack (init_thread_union.stack)
63-
6455
#definecpu_relax() barrier()
6556

6657
voiddefault_idle(void);

‎arch/cris/include/asm/thread_info.h‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
#endif
2121

2222

23+
/* THREAD_SIZE is the size of the thread_info/kernel_stack combo.
24+
* normally, the stack is found by doing something like p + THREAD_SIZE
25+
* in CRIS, a page is 8192 bytes, which seems like a sane size
26+
*/
27+
#defineTHREAD_SIZE PAGE_SIZE
28+
#defineTHREAD_SIZE_ORDER (0)
29+
2330
/*
2431
* low level task data that entry.S needs immediate access to
2532
* - this struct should fit entirely inside of one cache line
@@ -56,8 +63,6 @@ struct thread_info {
5663
.addr_limit= KERNEL_DS,\
5764
}
5865

59-
#defineinit_thread_info(init_thread_union.thread_info)
60-
6166
#endif/* !__ASSEMBLY__ */
6267

6368
/*

‎arch/cris/kernel/vmlinux.lds.S‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include<asm-generic/vmlinux.lds.h>
1313
#include<asm/page.h>
14+
#include<asm/thread_info.h>
1415

1516
#ifdef CONFIG_ETRAX_VMEM_SIZE
1617
#define __CONFIG_ETRAX_VMEM_SIZE CONFIG_ETRAX_VMEM_SIZE

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp