Skip to content

Commit

Permalink
x86: merge init_task_32/64.c
Browse files Browse the repository at this point in the history
Merge init_task_32/64.c.
Move 64bit per cpu data orig_ist to setup64.c.

[ mingo: fixed checkpatch trivialities. ]

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Hiroshi Shimamoto authored and Thomas Gleixner committed Oct 19, 2007
1 parent af93ebc commit 7778887
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 63 deletions.
2 changes: 1 addition & 1 deletion arch/i386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ core-$(CONFIG_XEN) += arch/x86/xen/
# default subarch .h files
mflags-y += -Iinclude/asm-x86/mach-default

head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task_32.o
head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task.o

libs-y += arch/x86/lib/
core-y += arch/x86/kernel/ \
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/Makefile_32
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#

extra-y := head_32.o init_task_32.o vmlinux.lds
extra-y := head_32.o init_task.o vmlinux.lds

obj-y := process_32.o signal_32.o entry_32.o traps_32.o irq_32.o \
ptrace_32.o time_32.o ioport_32.o ldt_32.o setup_32.o i8259_32.o sys_i386_32.o \
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/Makefile_64
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#

extra-y := head_64.o head64.o init_task_64.o vmlinux.lds
extra-y := head_64.o head64.o init_task.o vmlinux.lds
EXTRA_AFLAGS := -traditional
obj-y := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \
ptrace_64.o time_64.o ioport_64.o ldt_64.o setup_64.o i8259_64.o sys_x86_64.o \
Expand Down
11 changes: 6 additions & 5 deletions arch/x86/kernel/init_task_32.c → arch/x86/kernel/init_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ static struct files_struct init_files = INIT_FILES;
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
struct mm_struct init_mm = INIT_MM(init_mm);

EXPORT_SYMBOL(init_mm);

/*
Expand All @@ -25,7 +24,7 @@ EXPORT_SYMBOL(init_mm);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
union thread_union init_thread_union
union thread_union init_thread_union
__attribute__((__section__(".data.init_task"))) =
{ INIT_THREAD_INFO(init_task) };

Expand All @@ -35,12 +34,14 @@ union thread_union init_thread_union
* All other task structs will be allocated on slabs in fork.c
*/
struct task_struct init_task = INIT_TASK(init_task);

EXPORT_SYMBOL(init_task);

/*
* per-CPU TSS segments. Threads are completely 'soft' on Linux,
* no more per-task TSS's.
*/
* no more per-task TSS's. The TSS size is kept cacheline-aligned
* so they are allowed to end up in the .data.cacheline_aligned
* section. Since TSS's are completely CPU-local, we want them
* on exact cacheline boundaries, to eliminate cacheline ping-pong.
*/
DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS;

54 changes: 0 additions & 54 deletions arch/x86/kernel/init_task_64.c

This file was deleted.

6 changes: 6 additions & 0 deletions arch/x86/kernel/setup64.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ void __cpuinit check_efer(void)

unsigned long kernel_eflags;

/*
* Copies of the original ist values from the tss are only accessed during
* debugging, no special alignment required.
*/
DEFINE_PER_CPU(struct orig_ist, orig_ist);

/*
* cpu_init() initializes state that is per-CPU. Some data is already
* initialized (naturally) in the bootstrap process, such as the GDT
Expand Down
2 changes: 1 addition & 1 deletion arch/x86_64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ KBUILD_CFLAGS += $(cflags-y)
CFLAGS_KERNEL += $(cflags-kernel-y)
KBUILD_AFLAGS += -m64

head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o
head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task.o

libs-y += arch/x86/lib/
core-y += arch/x86/kernel/ \
Expand Down

0 comments on commit 7778887

Please sign in to comment.