Skip to content

Commit

Permalink
x86: Use generic init_task
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20120503085035.739963562@linutronix.de
Cc: x86@kernel.org
  • Loading branch information
Thomas Gleixner committed May 5, 2012
1 parent 5b40824 commit 4504689
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 44 deletions.
1 change: 1 addition & 0 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ config X86
select GENERIC_IOMAP
select DCACHE_WORD_ACCESS if !DEBUG_PAGEALLOC
select GENERIC_SMP_IDLE_THREAD
select HAVE_GENERIC_INIT_TASK

config INSTRUCTION_DECODER
def_bool (KPROBES || PERF_EVENTS)
Expand Down
1 change: 0 additions & 1 deletion arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ archheaders:
head-y := arch/x86/kernel/head_$(BITS).o
head-y += arch/x86/kernel/head$(BITS).o
head-y += arch/x86/kernel/head.o
head-y += arch/x86/kernel/init_task.o

libs-y += arch/x86/lib/

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

extra-y := head_$(BITS).o head$(BITS).o head.o init_task.o vmlinux.lds
extra-y := head_$(BITS).o head$(BITS).o head.o vmlinux.lds

CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)

Expand Down
42 changes: 0 additions & 42 deletions arch/x86/kernel/init_task.c

This file was deleted.

9 changes: 9 additions & 0 deletions arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
#include <asm/debugreg.h>
#include <asm/nmi.h>

/*
* per-CPU TSS segments. Threads are completely 'soft' on Linux,
* 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;

#ifdef CONFIG_X86_64
static DEFINE_PER_CPU(unsigned char, is_idle);
static ATOMIC_NOTIFIER_HEAD(idle_notifier);
Expand Down

0 comments on commit 4504689

Please sign in to comment.