aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2008-02-23 03:58:20 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:49 -0400
commit700efc1b9f6afe34caae231b87d129ad8ffb559f (patch)
tree272db7a6e7040b4833b2a6b8e241105f44ff2542
parent322850af8d93735f67b8ebf84bb1350639be3f34 (diff)
x86: introduce kernel/head32.c
Copy x86_64 and add a head32.c so we can start moving early architecture initialization out of assembly. [ Sam Ravnborg <sam@ravnborg.org>: updated it to x86 ] Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/Makefile6
-rw-r--r--arch/x86/kernel/Makefile3
-rw-r--r--arch/x86/kernel/head32.c14
-rw-r--r--arch/x86/kernel/head_32.S2
4 files changed, 19 insertions, 6 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index f1e739a43d41..03131ce1d526 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -159,9 +159,9 @@ KBUILD_AFLAGS += $(mflags-y)
159### 159###
160# Kernel objects 160# Kernel objects
161 161
162head-y := arch/x86/kernel/head_$(BITS).o 162head-y := arch/x86/kernel/head_$(BITS).o
163head-$(CONFIG_X86_64) += arch/x86/kernel/head64.o 163head-y += arch/x86/kernel/head$(BITS).o
164head-y += arch/x86/kernel/init_task.o 164head-y += arch/x86/kernel/init_task.o
165 165
166libs-y += arch/x86/lib/ 166libs-y += arch/x86/lib/
167 167
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 80e6695a12a3..df10327182d4 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -2,8 +2,7 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5extra-y := head_$(BITS).o init_task.o vmlinux.lds 5extra-y := head_$(BITS).o head$(BITS).o init_task.o vmlinux.lds
6extra-$(CONFIG_X86_64) += head64.o
7 6
8CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) 7CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
9 8
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
new file mode 100644
index 000000000000..3db059058927
--- /dev/null
+++ b/arch/x86/kernel/head32.c
@@ -0,0 +1,14 @@
1/*
2 * linux/arch/i386/kernel/head32.c -- prepare to run common code
3 *
4 * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
5 * Copyright (C) 2007 Eric Biederman <ebiederm@xmission.com>
6 */
7
8#include <linux/init.h>
9#include <linux/start_kernel.h>
10
11void __init i386_start_kernel(void)
12{
13 start_kernel();
14}
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index 74d87ea85b5c..826988a6e964 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -450,7 +450,7 @@ is386: movl $2,%ecx # set MP
450 jmp initialize_secondary # all other CPUs call initialize_secondary 450 jmp initialize_secondary # all other CPUs call initialize_secondary
4511: 4511:
452#endif /* CONFIG_SMP */ 452#endif /* CONFIG_SMP */
453 jmp start_kernel 453 jmp i386_start_kernel
454 454
455/* 455/*
456 * We depend on ET to be correct. This checks for 287/387. 456 * We depend on ET to be correct. This checks for 287/387.