aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/Makefile2
-rw-r--r--arch/x86/kernel/Makefile_322
-rw-r--r--arch/x86/kernel/Makefile_642
-rw-r--r--arch/x86/kernel/init_task.c (renamed from arch/x86/kernel/init_task_32.c)11
-rw-r--r--arch/x86/kernel/init_task_64.c54
-rw-r--r--arch/x86/kernel/setup64.c6
-rw-r--r--arch/x86_64/Makefile2
7 files changed, 16 insertions, 63 deletions
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index d82f11de60ce..b88e47ca3032 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -102,7 +102,7 @@ core-$(CONFIG_XEN) += arch/x86/xen/
102# default subarch .h files 102# default subarch .h files
103mflags-y += -Iinclude/asm-x86/mach-default 103mflags-y += -Iinclude/asm-x86/mach-default
104 104
105head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task_32.o 105head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task.o
106 106
107libs-y += arch/x86/lib/ 107libs-y += arch/x86/lib/
108core-y += arch/x86/kernel/ \ 108core-y += arch/x86/kernel/ \
diff --git a/arch/x86/kernel/Makefile_32 b/arch/x86/kernel/Makefile_32
index a3fa11f8f460..69990f0ba86e 100644
--- a/arch/x86/kernel/Makefile_32
+++ b/arch/x86/kernel/Makefile_32
@@ -2,7 +2,7 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5extra-y := head_32.o init_task_32.o vmlinux.lds 5extra-y := head_32.o init_task.o vmlinux.lds
6 6
7obj-y := process_32.o signal_32.o entry_32.o traps_32.o irq_32.o \ 7obj-y := process_32.o signal_32.o entry_32.o traps_32.o irq_32.o \
8 ptrace_32.o time_32.o ioport_32.o ldt_32.o setup_32.o i8259_32.o sys_i386_32.o \ 8 ptrace_32.o time_32.o ioport_32.o ldt_32.o setup_32.o i8259_32.o sys_i386_32.o \
diff --git a/arch/x86/kernel/Makefile_64 b/arch/x86/kernel/Makefile_64
index 43da66213a47..2fc3d3f2c27e 100644
--- a/arch/x86/kernel/Makefile_64
+++ b/arch/x86/kernel/Makefile_64
@@ -2,7 +2,7 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5extra-y := head_64.o head64.o init_task_64.o vmlinux.lds 5extra-y := head_64.o head64.o init_task.o vmlinux.lds
6EXTRA_AFLAGS := -traditional 6EXTRA_AFLAGS := -traditional
7obj-y := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \ 7obj-y := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \
8 ptrace_64.o time_64.o ioport_64.o ldt_64.o setup_64.o i8259_64.o sys_x86_64.o \ 8 ptrace_64.o time_64.o ioport_64.o ldt_64.o setup_64.o i8259_64.o sys_x86_64.o \
diff --git a/arch/x86/kernel/init_task_32.c b/arch/x86/kernel/init_task.c
index d26fc063a760..468c9c437842 100644
--- a/arch/x86/kernel/init_task_32.c
+++ b/arch/x86/kernel/init_task.c
@@ -15,7 +15,6 @@ static struct files_struct init_files = INIT_FILES;
15static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 15static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
16static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 16static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
17struct mm_struct init_mm = INIT_MM(init_mm); 17struct mm_struct init_mm = INIT_MM(init_mm);
18
19EXPORT_SYMBOL(init_mm); 18EXPORT_SYMBOL(init_mm);
20 19
21/* 20/*
@@ -25,7 +24,7 @@ EXPORT_SYMBOL(init_mm);
25 * way process stacks are handled. This is done by having a special 24 * way process stacks are handled. This is done by having a special
26 * "init_task" linker map entry.. 25 * "init_task" linker map entry..
27 */ 26 */
28union thread_union init_thread_union 27union thread_union init_thread_union
29 __attribute__((__section__(".data.init_task"))) = 28 __attribute__((__section__(".data.init_task"))) =
30 { INIT_THREAD_INFO(init_task) }; 29 { INIT_THREAD_INFO(init_task) };
31 30
@@ -35,12 +34,14 @@ union thread_union init_thread_union
35 * All other task structs will be allocated on slabs in fork.c 34 * All other task structs will be allocated on slabs in fork.c
36 */ 35 */
37struct task_struct init_task = INIT_TASK(init_task); 36struct task_struct init_task = INIT_TASK(init_task);
38
39EXPORT_SYMBOL(init_task); 37EXPORT_SYMBOL(init_task);
40 38
41/* 39/*
42 * per-CPU TSS segments. Threads are completely 'soft' on Linux, 40 * per-CPU TSS segments. Threads are completely 'soft' on Linux,
43 * no more per-task TSS's. 41 * no more per-task TSS's. The TSS size is kept cacheline-aligned
44 */ 42 * so they are allowed to end up in the .data.cacheline_aligned
43 * section. Since TSS's are completely CPU-local, we want them
44 * on exact cacheline boundaries, to eliminate cacheline ping-pong.
45 */
45DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS; 46DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
46 47
diff --git a/arch/x86/kernel/init_task_64.c b/arch/x86/kernel/init_task_64.c
deleted file mode 100644
index 4ff33d4f8551..000000000000
--- a/arch/x86/kernel/init_task_64.c
+++ /dev/null
@@ -1,54 +0,0 @@
1#include <linux/mm.h>
2#include <linux/module.h>
3#include <linux/sched.h>
4#include <linux/init.h>
5#include <linux/init_task.h>
6#include <linux/fs.h>
7#include <linux/mqueue.h>
8
9#include <asm/uaccess.h>
10#include <asm/pgtable.h>
11#include <asm/desc.h>
12
13static struct fs_struct init_fs = INIT_FS;
14static struct files_struct init_files = INIT_FILES;
15static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
16static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
17struct mm_struct init_mm = INIT_MM(init_mm);
18
19EXPORT_SYMBOL(init_mm);
20
21/*
22 * Initial task structure.
23 *
24 * We need to make sure that this is 8192-byte aligned due to the
25 * way process stacks are handled. This is done by having a special
26 * "init_task" linker map entry..
27 */
28union thread_union init_thread_union
29 __attribute__((__section__(".data.init_task"))) =
30 { INIT_THREAD_INFO(init_task) };
31
32/*
33 * Initial task structure.
34 *
35 * All other task structs will be allocated on slabs in fork.c
36 */
37struct task_struct init_task = INIT_TASK(init_task);
38
39EXPORT_SYMBOL(init_task);
40/*
41 * per-CPU TSS segments. Threads are completely 'soft' on Linux,
42 * no more per-task TSS's. The TSS size is kept cacheline-aligned
43 * so they are allowed to end up in the .data.cacheline_aligned
44 * section. Since TSS's are completely CPU-local, we want them
45 * on exact cacheline boundaries, to eliminate cacheline ping-pong.
46 */
47DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;
48
49/* Copies of the original ist values from the tss are only accessed during
50 * debugging, no special alignment required.
51 */
52DEFINE_PER_CPU(struct orig_ist, orig_ist);
53
54#define ALIGN_TO_4K __attribute__((section(".data.init_task")))
diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c
index ba9188235057..e11886e8d8ca 100644
--- a/arch/x86/kernel/setup64.c
+++ b/arch/x86/kernel/setup64.c
@@ -185,6 +185,12 @@ void __cpuinit check_efer(void)
185unsigned long kernel_eflags; 185unsigned long kernel_eflags;
186 186
187/* 187/*
188 * Copies of the original ist values from the tss are only accessed during
189 * debugging, no special alignment required.
190 */
191DEFINE_PER_CPU(struct orig_ist, orig_ist);
192
193/*
188 * cpu_init() initializes state that is per-CPU. Some data is already 194 * cpu_init() initializes state that is per-CPU. Some data is already
189 * initialized (naturally) in the bootstrap process, such as the GDT 195 * initialized (naturally) in the bootstrap process, such as the GDT
190 * and IDT. We reload them nevertheless, this function acts as a 196 * and IDT. We reload them nevertheless, this function acts as a
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index f48d862397fb..6d89ab762ffc 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -74,7 +74,7 @@ KBUILD_CFLAGS += $(cflags-y)
74CFLAGS_KERNEL += $(cflags-kernel-y) 74CFLAGS_KERNEL += $(cflags-kernel-y)
75KBUILD_AFLAGS += -m64 75KBUILD_AFLAGS += -m64
76 76
77head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o 77head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task.o
78 78
79libs-y += arch/x86/lib/ 79libs-y += arch/x86/lib/
80core-y += arch/x86/kernel/ \ 80core-y += arch/x86/kernel/ \