aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup.c
diff options
context:
space:
mode:
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 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
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;