x86: memory corruption check - cleanup
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>
This commit is contained in:
parent
a9b9e81c91
commit
46eaa67020
5 changed files with 19 additions and 18 deletions
|
@ -31,6 +31,7 @@
|
||||||
#include <linux/cpumask.h>
|
#include <linux/cpumask.h>
|
||||||
|
|
||||||
#include <asm/asm.h>
|
#include <asm/asm.h>
|
||||||
|
#include <asm/bios_ebda.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include <linux/nmi.h>
|
#include <linux/nmi.h>
|
||||||
|
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
|
#include <asm/bios_ebda.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
|
|
|
@ -254,7 +254,6 @@ static char *pm_verb(int event)
|
||||||
|
|
||||||
static void pm_dev_dbg(struct device *dev, pm_message_t state, char *info)
|
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),
|
dev_dbg(dev, "%s%s%s\n", info, pm_verb(state.event),
|
||||||
((state.event & PM_EVENT_SLEEP) && device_may_wakeup(dev)) ?
|
((state.event & PM_EVENT_SLEEP) && device_may_wakeup(dev)) ?
|
||||||
", may wakeup" : "");
|
", may wakeup" : "");
|
||||||
|
|
|
@ -16,4 +16,21 @@ static inline unsigned int get_bios_ebda(void)
|
||||||
|
|
||||||
void reserve_ebda_region(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 */
|
#endif /* ASM_X86__BIOS_EBDA_H */
|
||||||
|
|
|
@ -240,23 +240,6 @@ extern const char *print_tainted(void);
|
||||||
extern void add_taint(unsigned);
|
extern void add_taint(unsigned);
|
||||||
extern int root_mountflags;
|
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 */
|
/* Values used for system_state */
|
||||||
extern enum system_states {
|
extern enum system_states {
|
||||||
SYSTEM_BOOTING,
|
SYSTEM_BOOTING,
|
||||||
|
|
Loading…
Reference in a new issue