[tip:x86/cleanups] x86: Add probe_roms to x86_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  f7cf5a5b8c0e59eac8d30b62271cb0fa52e53ebc
Gitweb:     http://git.kernel.org/tip/f7cf5a5b8c0e59eac8d30b62271cb0fa52e53ebc
Author:     Thomas Gleixner <tglx@xxxxxxxxxxxxx>
AuthorDate: Wed, 19 Aug 2009 14:43:56 +0200
Committer:  Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitDate: Thu, 27 Aug 2009 17:12:52 +0200

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@xxxxxxxxxxxxx>


---
 arch/x86/include/asm/x86_init.h |   10 ++++++++++
 arch/x86/kernel/head32.c        |    3 +++
 arch/x86/kernel/setup.c         |    4 +---
 arch/x86/kernel/x86_init.c      |    4 ++++
 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 14d1107..75e9e68 100644
--- a/arch/x86/include/asm/x86_init.h
+++ b/arch/x86/include/asm/x86_init.h
@@ -2,10 +2,20 @@
 #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 {
+	struct x86_init_resources resources;
 };
 
 extern struct x86_init_ops x86_init;
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index 3f8579f..4049353 100644
--- a/arch/x86/kernel/head32.c
+++ b/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 */
+	x86_init.resources.probe_roms = probe_roms;
+
 	reserve_ebda_region();
 
 	/*
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 63f32d2..5796eb1 100644
--- a/arch/x86/kernel/setup.c
+++ b/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
+	x86_init.resources.probe_roms();
 
 	/* after parse_early_param, so could debug it */
 	insert_resource(&iomem_resource, &code_resource);
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index 82d510c..88883f8 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) { }
  * for standard PC hardware.
  */
 struct __initdata x86_init_ops x86_init = {
+
+	.resources = {
+		.probe_roms		= x86_init_noop,
+	},
 };
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux