diff options
author | Hugh Dickins <hugh@veritas.com> | 2008-09-07 04:51:33 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-07 11:40:00 -0400 |
commit | bb577f980ef35e2b0d00aeed566724e5032aa5eb (patch) | |
tree | 2c9016f7811fb3ea80bbbc8d9856c217110695b7 /arch/x86/kernel/setup.c | |
parent | 5394f80f92642c61fc2a95385be85f2fdcfb5adb (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.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index ee89ebc5aabc..c239b3780973 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 | ||
625 | static int __read_mostly bios_corruption_check = 1; | 625 | static int __read_mostly bios_corruption_check = 1; |
626 | static struct timer_list periodic_check_timer; | ||
626 | 627 | ||
627 | void check_for_bios_corruption(void) | 628 | void 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 | ||
654 | static 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 | |||
660 | void 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 | |||
653 | static int set_bios_corruption_check(char *arg) | 670 | static int set_bios_corruption_check(char *arg) |
654 | { | 671 | { |
655 | char *end; | 672 | char *end; |