[PATCH 10/12] i386: Introduce head32.c

From: Eric W. Biederman
Date: Mon Apr 30 2007 - 12:33:50 EST



Copy x86_64 and add a head32.c so we can start moving early
architecture initialization out of assembly.

Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
---
arch/i386/Makefile | 2 +-
arch/i386/kernel/Makefile | 2 +-
arch/i386/kernel/head.S | 2 +-
arch/i386/kernel/head32.c | 14 ++++++++++++++
4 files changed, 17 insertions(+), 3 deletions(-)
create mode 100644 arch/i386/kernel/head32.c

diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index 6dc5e5d..89e6f6f 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -96,7 +96,7 @@ core-$(CONFIG_X86_ES7000) := arch/i386/mach-es7000/
# default subarch .h files
mflags-y += -Iinclude/asm-i386/mach-default

-head-y := arch/i386/kernel/head.o arch/i386/kernel/init_task.o
+head-y := arch/i386/kernel/head.o arch/i386/kernel/head32.o arch/i386/kernel/init_task.o

libs-y += arch/i386/lib/
core-y += arch/i386/kernel/ \
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 4c96141..530ccaa 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#

-extra-y := head.o init_task.o vmlinux.lds
+extra-y := head.o head32.o init_task.o vmlinux.lds

obj-y := process.o signal.o entry.o traps.o irq.o \
ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index de65f45..22ddb3f 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -300,7 +300,7 @@ is386: movl $2,%ecx # set MP
jmp initialize_secondary # all other CPUs call initialize_secondary
1:
#endif /* CONFIG_SMP */
- jmp start_kernel
+ jmp i386_start_kernel

/*
* We depend on ET to be correct. This checks for 287/387.
diff --git a/arch/i386/kernel/head32.c b/arch/i386/kernel/head32.c
new file mode 100644
index 0000000..3db0590
--- /dev/null
+++ b/arch/i386/kernel/head32.c
@@ -0,0 +1,14 @@
+/*
+ * linux/arch/i386/kernel/head32.c -- prepare to run common code
+ *
+ * Copyright (C) 2000 Andrea Arcangeli <andrea@xxxxxxx> SuSE
+ * Copyright (C) 2007 Eric Biederman <ebiederm@xxxxxxxxxxxx>
+ */
+
+#include <linux/init.h>
+#include <linux/start_kernel.h>
+
+void __init i386_start_kernel(void)
+{
+ start_kernel();
+}
--
1.5.1.1.181.g2de0

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/