}
static int __read_mostly bios_corruption_check = 1;
+static struct timer_list periodic_check_timer;
void check_for_bios_corruption(void)
{
dump_stack();
}
+static void periodic_check_for_corruption(unsigned long data)
+{
+ check_for_bios_corruption();
+ mod_timer(&periodic_check_timer, jiffies + 60*HZ);
+}
+
+void start_periodic_check_for_corruption(void)
+{
+ if (!bios_corruption_check)
+ return;
+
+ init_timer(&periodic_check_timer);
+ periodic_check_timer.function = &periodic_check_for_corruption;
+ periodic_check_for_corruption(0);
+}
+
static int set_bios_corruption_check(char *arg)
{
char *end;
* Oops. The kernel tried to access some bad page. We'll have to
* terminate things with extreme prejudice.
*/
- check_for_bios_corruption();
-
#ifdef CONFIG_X86_32
bust_spinlocks(1);
#else
int codesize, reservedpages, datasize, initsize;
int tmp;
+ start_periodic_check_for_corruption();
+
#ifdef CONFIG_FLATMEM
BUG_ON(!mem_map);
#endif
{
long codesize, reservedpages, datasize, initsize;
+ start_periodic_check_for_corruption();
+
pci_iommu_alloc();
/* clear_bss() already clear the empty_zero_page */
* 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)
{