aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-08-19 08:43:56 -0400
committerThomas Gleixner <tglx@linutronix.de>2009-08-27 11:12:52 -0400
commitf7cf5a5b8c0e59eac8d30b62271cb0fa52e53ebc (patch)
tree9ab5f0e8e895681a326dd94cb969c950c03271aa
parent57844a8f8e29802f37ad9a0f94eb11d6ae358603 (diff)
x86: Add probe_roms to x86_init
probe_roms is only used on 32bit. Add it to the x86_init ops and remove the #ifdefs. Default initializer is x86_init_noop() which is overridden in the 32bit boot code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/include/asm/x86_init.h10
-rw-r--r--arch/x86/kernel/head32.c3
-rw-r--r--arch/x86/kernel/setup.c4
-rw-r--r--arch/x86/kernel/x86_init.c4
4 files changed, 18 insertions, 3 deletions
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
index 14d11071675f..75e9e68d635f 100644
--- a/arch/x86/include/asm/x86_init.h
+++ b/arch/x86/include/asm/x86_init.h
@@ -2,10 +2,20 @@
2#define _ASM_X86_PLATFORM_H 2#define _ASM_X86_PLATFORM_H
3 3
4/** 4/**
5 * struct x86_init_resources - platform specific resource related ops
6 * @probe_roms: probe BIOS roms
7 *
8 */
9struct x86_init_resources {
10 void (*probe_roms)(void);
11};
12
13/**
5 * struct x86_init_ops - functions for platform specific setup 14 * struct x86_init_ops - functions for platform specific setup
6 * 15 *
7 */ 16 */
8struct x86_init_ops { 17struct x86_init_ops {
18 struct x86_init_resources resources;
9}; 19};
10 20
11extern struct x86_init_ops x86_init; 21extern struct x86_init_ops x86_init;
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index 3f8579f8d42c..4049353152cf 100644
--- a/arch/x86/kernel/head32.c
+++ b/arch/x86/kernel/head32.c
@@ -29,6 +29,9 @@ void __init i386_start_kernel(void)
29 reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); 29 reserve_early(ramdisk_image, ramdisk_end, "RAMDISK");
30 } 30 }
31#endif 31#endif
32 /* Initilize 32bit specific setup functions */
33 x86_init.resources.probe_roms = probe_roms;
34
32 reserve_ebda_region(); 35 reserve_ebda_region();
33 36
34 /* 37 /*
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 63f32d220ef2..5796eb158d49 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -835,9 +835,7 @@ void __init setup_arch(char **cmdline_p)
835 */ 835 */
836 init_hypervisor(&boot_cpu_data); 836 init_hypervisor(&boot_cpu_data);
837 837
838#ifdef CONFIG_X86_32 838 x86_init.resources.probe_roms();
839 probe_roms();
840#endif
841 839
842 /* after parse_early_param, so could debug it */ 840 /* after parse_early_param, so could debug it */
843 insert_resource(&iomem_resource, &code_resource); 841 insert_resource(&iomem_resource, &code_resource);
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index 82d510c9c996..88883f8006c2 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -14,4 +14,8 @@ void __cpuinit x86_init_noop(void) { }
14 * for standard PC hardware. 14 * for standard PC hardware.
15 */ 15 */
16struct __initdata x86_init_ops x86_init = { 16struct __initdata x86_init_ops x86_init = {
17
18 .resources = {
19 .probe_roms = x86_init_noop,
20 },
17}; 21};