Commit f7cf5a5b authored by Thomas Gleixner's avatar Thomas Gleixner

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: default avatarThomas Gleixner <tglx@linutronix.de>
parent 57844a8f
#ifndef _ASM_X86_PLATFORM_H #ifndef _ASM_X86_PLATFORM_H
#define _ASM_X86_PLATFORM_H #define _ASM_X86_PLATFORM_H
/**
* struct x86_init_resources - platform specific resource related ops
* @probe_roms: probe BIOS roms
*
*/
struct x86_init_resources {
void (*probe_roms)(void);
};
/** /**
* struct x86_init_ops - functions for platform specific setup * struct x86_init_ops - functions for platform specific setup
* *
*/ */
struct x86_init_ops { struct x86_init_ops {
struct x86_init_resources resources;
}; };
extern struct x86_init_ops x86_init; extern struct x86_init_ops x86_init;
......
...@@ -29,6 +29,9 @@ void __init i386_start_kernel(void) ...@@ -29,6 +29,9 @@ void __init i386_start_kernel(void)
reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); reserve_early(ramdisk_image, ramdisk_end, "RAMDISK");
} }
#endif #endif
/* Initilize 32bit specific setup functions */
x86_init.resources.probe_roms = probe_roms;
reserve_ebda_region(); reserve_ebda_region();
/* /*
......
...@@ -835,9 +835,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -835,9 +835,7 @@ void __init setup_arch(char **cmdline_p)
*/ */
init_hypervisor(&boot_cpu_data); init_hypervisor(&boot_cpu_data);
#ifdef CONFIG_X86_32 x86_init.resources.probe_roms();
probe_roms();
#endif
/* after parse_early_param, so could debug it */ /* after parse_early_param, so could debug it */
insert_resource(&iomem_resource, &code_resource); insert_resource(&iomem_resource, &code_resource);
......
...@@ -14,4 +14,8 @@ void __cpuinit x86_init_noop(void) { } ...@@ -14,4 +14,8 @@ void __cpuinit x86_init_noop(void) { }
* for standard PC hardware. * for standard PC hardware.
*/ */
struct __initdata x86_init_ops x86_init = { struct __initdata x86_init_ops x86_init = {
.resources = {
.probe_roms = x86_init_noop,
},
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment