diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-05-03 05:02:55 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2012-05-05 07:00:24 -0400 |
commit | 957b369c3d35d73e1d0c3e9d21db791e58984cbb (patch) | |
tree | 01e6ad2e55b8563f1150c5b32181e284fcc0836f /arch/mips/kernel | |
parent | 16caadb8c8f8461b853bd3a310d7730cf5a0aec4 (diff) |
mips: Use generic init_task
Same code. Use the generic version. The special Makefile treatment is
pointless anyway as init_task.o contains only data which is handled by
the linker script. So no point on being treated like head text.
Make the linker script align the task on THREAD_SIZE and not on
PAGE_SIZE, as PAGE_SIZE might be smaller than THREAD_SIZE.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Link: http://lkml.kernel.org/r/20120503085034.941344764@linutronix.de
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/kernel/init_task.c | 35 | ||||
-rw-r--r-- | arch/mips/kernel/vmlinux.lds.S | 2 |
3 files changed, 2 insertions, 37 deletions
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 0c6877ea9004..fdaf65e1a99d 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the Linux/MIPS kernel. | 2 | # Makefile for the Linux/MIPS kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | extra-y := head.o init_task.o vmlinux.lds | 5 | extra-y := head.o vmlinux.lds |
6 | 6 | ||
7 | obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \ | 7 | obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \ |
8 | ptrace.o reset.o setup.o signal.o syscall.o \ | 8 | ptrace.o reset.o setup.o signal.o syscall.o \ |
diff --git a/arch/mips/kernel/init_task.c b/arch/mips/kernel/init_task.c deleted file mode 100644 index 5f9a76263c9a..000000000000 --- a/arch/mips/kernel/init_task.c +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | #include <linux/mm.h> | ||
2 | #include <linux/export.h> | ||
3 | #include <linux/sched.h> | ||
4 | #include <linux/init_task.h> | ||
5 | #include <linux/fs.h> | ||
6 | #include <linux/mqueue.h> | ||
7 | |||
8 | #include <asm/thread_info.h> | ||
9 | #include <asm/uaccess.h> | ||
10 | #include <asm/pgtable.h> | ||
11 | |||
12 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | ||
13 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | ||
14 | /* | ||
15 | * Initial thread structure. | ||
16 | * | ||
17 | * We need to make sure that this is 8192-byte aligned due to the | ||
18 | * way process stacks are handled. This is done by making sure | ||
19 | * the linker maps this in the .text segment right after head.S, | ||
20 | * and making head.S ensure the proper alignment. | ||
21 | * | ||
22 | * The things we do for performance.. | ||
23 | */ | ||
24 | union thread_union init_thread_union __init_task_data | ||
25 | __attribute__((__aligned__(THREAD_SIZE))) = | ||
26 | { INIT_THREAD_INFO(init_task) }; | ||
27 | |||
28 | /* | ||
29 | * Initial task structure. | ||
30 | * | ||
31 | * All other task structs will be allocated on slabs in fork.c | ||
32 | */ | ||
33 | struct task_struct init_task = INIT_TASK(init_task); | ||
34 | |||
35 | EXPORT_SYMBOL(init_task); | ||
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 924da5eb7031..e6772f2cf3df 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -72,7 +72,7 @@ SECTIONS | |||
72 | .data : { /* Data */ | 72 | .data : { /* Data */ |
73 | . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ | 73 | . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ |
74 | 74 | ||
75 | INIT_TASK_DATA(PAGE_SIZE) | 75 | INIT_TASK_DATA(THREAD_SIZE) |
76 | NOSAVE_DATA | 76 | NOSAVE_DATA |
77 | CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) | 77 | CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) |
78 | READ_MOSTLY_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) | 78 | READ_MOSTLY_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT) |