aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/vmlinux_32.lds.S
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2008-02-15 06:00:23 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:47 -0400
commit03ae5768b6110ebaa97dc3e7abf1c3d8bec5f874 (patch)
treee9dffa8c5eccd43ea8284d7e2e48b782166bbcac /arch/x86/kernel/vmlinux_32.lds.S
parentbc7c314d7048017caa0725b41cc577cccf4fc53b (diff)
x86: use ELF section to list CPU vendor specific code
Replace the hardcoded list of initialization functions for each CPU vendor by a list in an ELF section, which is read at initialization in arch/x86/kernel/cpu/cpu.c to fill the cpu_devs[] array. The ELF section, named .x86cpuvendor.init, is reclaimed after boot, and contains entries of type "struct cpu_vendor_dev" which associates a vendor number with a pointer to a "struct cpu_dev" structure. This first modification allows to remove all the VENDOR_init_cpu() functions. This patch also removes the hardcoded calls to early_init_amd() and early_init_intel(). Instead, we add a "c_early_init" member to the cpu_dev structure, which is then called if not NULL by the generic CPU initialization code. Unfortunately, in early_cpu_detect(), this_cpu is not yet set, so we have to use the cpu_devs[] array directly. This patch is part of the Linux Tiny project, and is needed for further patch that will allow to disable compilation of unused CPU support code. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/vmlinux_32.lds.S')
-rw-r--r--arch/x86/kernel/vmlinux_32.lds.S5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S
index 2ffa9656fe7a..ce5ed083a1e9 100644
--- a/arch/x86/kernel/vmlinux_32.lds.S
+++ b/arch/x86/kernel/vmlinux_32.lds.S
@@ -149,6 +149,11 @@ SECTIONS
149 *(.con_initcall.init) 149 *(.con_initcall.init)
150 __con_initcall_end = .; 150 __con_initcall_end = .;
151 } 151 }
152 .x86cpuvendor.init : AT(ADDR(.x86cpuvendor.init) - LOAD_OFFSET) {
153 __x86cpuvendor_start = .;
154 *(.x86cpuvendor.init)
155 __x86cpuvendor_end = .;
156 }
152 SECURITY_INIT 157 SECURITY_INIT
153 . = ALIGN(4); 158 . = ALIGN(4);
154 .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) { 159 .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) {