x86: memory corruption check - cleanup
authorIngo Molnar <mingo@elte.hu>
Sun, 12 Oct 2008 13:06:29 +0000 (15:06 +0200)
committerIngo Molnar <mingo@elte.hu>
Sun, 12 Oct 2008 13:09:23 +0000 (15:09 +0200)
Move the prototypes from the generic kernel.h header to the more
appropriate include/asm-x86/bios_ebda.h header file.

Also, remove the check from the power management code - this is a
pure x86 matter for now.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/init_32.c
arch/x86/mm/init_64.c
drivers/base/power/main.c
include/asm-x86/bios_ebda.h
include/linux/kernel.h

index 7e05462ffb1177e9a53b9e229170e90cdfa35db5..bbe044dbe01403b0bdf67dbf4fe7e46e4e00a07e 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/cpumask.h>
 
 #include <asm/asm.h>
+#include <asm/bios_ebda.h>
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
index d84d3e91d348190f1dc5fb50d2010722d1f01fba..3e10054c57319c25626bd1f43bf830c11453b255 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/nmi.h>
 
 #include <asm/processor.h>
+#include <asm/bios_ebda.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
index bf6d3554e506c46b8da6dcb346dce0bffeb0bfce..273a944d4040e861afa6a1ea6c601264eec6c4a7 100644 (file)
@@ -254,7 +254,6 @@ static char *pm_verb(int event)
 
 static void pm_dev_dbg(struct device *dev, pm_message_t state, char *info)
 {
-       check_for_bios_corruption();
        dev_dbg(dev, "%s%s%s\n", info, pm_verb(state.event),
                ((state.event & PM_EVENT_SLEEP) && device_may_wakeup(dev)) ?
                ", may wakeup" : "");
index ec42ed8745913383cbb81be7c28556c4ddbacdd0..79b4b88505d743eed1e0e5ad7c6e55df8dc63c3f 100644 (file)
@@ -16,4 +16,21 @@ static inline unsigned int get_bios_ebda(void)
 
 void reserve_ebda_region(void);
 
+#ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
+/*
+ * This is obviously not a great place for this, but we want to be
+ * able to scatter it around anywhere in the kernel.
+ */
+void check_for_bios_corruption(void);
+void start_periodic_check_for_corruption(void);
+#else
+static inline void check_for_bios_corruption(void)
+{
+}
+
+static inline void start_periodic_check_for_corruption(void)
+{
+}
+#endif
+
 #endif /* ASM_X86__BIOS_EBDA_H */
index 50873b211788b69d8122f3ff78e24a4ef3b0c657..2651f805ba6d771b9ec1f26078609aebdb198853 100644 (file)
@@ -240,23 +240,6 @@ extern const char *print_tainted(void);
 extern void add_taint(unsigned);
 extern int root_mountflags;
 
-#ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
-/*
- * This is obviously not a great place for this, but we want to be
- * able to scatter it around anywhere in the kernel.
- */
-void check_for_bios_corruption(void);
-void start_periodic_check_for_corruption(void);
-#else
-static inline void check_for_bios_corruption(void)
-{
-}
-
-static inline void start_periodic_check_for_corruption(void)
-{
-}
-#endif
-
 /* Values used for system_state */
 extern enum system_states {
        SYSTEM_BOOTING,