aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2008-09-07 04:51:33 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-07 11:40:00 -0400
commitbb577f980ef35e2b0d00aeed566724e5032aa5eb (patch)
tree2c9016f7811fb3ea80bbbc8d9856c217110695b7 /arch/x86/kernel/setup.c
parent5394f80f92642c61fc2a95385be85f2fdcfb5adb (diff)
x86: add periodic corruption check
Perodically check for corruption in low phusical memory. Don't bother checking at fault time, since it won't show anything useful. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r--arch/x86/kernel/setup.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index ee89ebc5aab..c239b378097 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -623,6 +623,7 @@ static void __init setup_bios_corruption_check(void)
623} 623}
624 624
625static int __read_mostly bios_corruption_check = 1; 625static int __read_mostly bios_corruption_check = 1;
626static struct timer_list periodic_check_timer;
626 627
627void check_for_bios_corruption(void) 628void check_for_bios_corruption(void)
628{ 629{
@@ -650,6 +651,22 @@ void check_for_bios_corruption(void)
650 dump_stack(); 651 dump_stack();
651} 652}
652 653
654static void periodic_check_for_corruption(unsigned long data)
655{
656 check_for_bios_corruption();
657 mod_timer(&periodic_check_timer, jiffies + 60*HZ);
658}
659
660void start_periodic_check_for_corruption(void)
661{
662 if (!bios_corruption_check)
663 return;
664
665 init_timer(&periodic_check_timer);
666 periodic_check_timer.function = &periodic_check_for_corruption;
667 periodic_check_for_corruption(0);
668}
669
653static int set_bios_corruption_check(char *arg) 670static int set_bios_corruption_check(char *arg)
654{ 671{
655 char *end; 672 char *end;