Messages in this thread Patch in this message | | | Date | Fri, 21 Aug 2009 21:29:38 -0000 | From | Thomas Gleixner <> | Subject | [RFC patch 02/32] x86: Add probe_roms to platform_setup |
| |
probe_roms is only used on 32bit. Add it to the platform_setup code and remove the #ifdefs.
Default initializer is platform_setup_noop() which is overridden in the 32bit boot code.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- arch/x86/include/asm/platform.h | 10 ++++++++++ arch/x86/kernel/head32.c | 3 +++ arch/x86/kernel/platform_setup.c | 4 ++++ arch/x86/kernel/setup.c | 4 +--- 4 files changed, 18 insertions(+), 3 deletions(-)
Index: linux-2.6/arch/x86/include/asm/platform.h =================================================================== --- linux-2.6.orig/arch/x86/include/asm/platform.h +++ linux-2.6/arch/x86/include/asm/platform.h @@ -9,10 +9,20 @@ struct platform_setup_quirks { }; /** + * struct platform_setup_resources - platform specific resource related ops + * @probe_roms: probe BIOS roms + * + */ +struct platform_setup_resources { + void (*probe_roms)(void); +}; + +/** * struct platform_setup_ops - functions for platform specific setup * */ struct platform_setup_ops { + struct platform_setup_resources resources; struct platform_setup_quirks quirks; }; Index: linux-2.6/arch/x86/kernel/head32.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/head32.c +++ linux-2.6/arch/x86/kernel/head32.c @@ -29,6 +29,9 @@ void __init i386_start_kernel(void) reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); } #endif + /* Initilize 32bit specific setup functions */ + platform_setup.resources.probe_roms = probe_roms; + reserve_ebda_region(); /* Index: linux-2.6/arch/x86/kernel/platform_setup.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/platform_setup.c +++ linux-2.6/arch/x86/kernel/platform_setup.c @@ -14,4 +14,8 @@ void __cpuinit platform_setup_noop(void) * for standard PC hardware. */ struct __initdata platform_setup_ops platform_setup = { + + .resources = { + .probe_roms = platform_setup_noop, + }, }; Index: linux-2.6/arch/x86/kernel/setup.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/setup.c +++ linux-2.6/arch/x86/kernel/setup.c @@ -835,9 +835,7 @@ void __init setup_arch(char **cmdline_p) */ init_hypervisor(&boot_cpu_data); -#ifdef CONFIG_X86_32 - probe_roms(); -#endif + platform_setup.resources.probe_roms(); /* after parse_early_param, so could debug it */ insert_resource(&iomem_resource, &code_resource);
| |