Skip to content

Commit

Permalink
x86: Don't check for BIOS corruption in first 64K when there's no nee…
Browse files Browse the repository at this point in the history
…d to

Due to commit 781c5a6 it is
likely that the number of areas to scan for BIOS corruption is 0
 -- especially when the first 64K is already reserved
(X86_RESERVE_LOW is 64K by default).

If that's the case then don't set up the scan.

Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Cc: <stable@kernel.org>
LKML-Reference: <20110225202838.2229.71011.sendpatchset@nchumbalkar.americas.hpqcorp.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Naga Chumbalkar authored and Ingo Molnar committed Mar 9, 2011
1 parent 5471262 commit a7bd1da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/x86/kernel/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ void __init setup_bios_corruption_check(void)
addr += size;
}

printk(KERN_INFO "Scanning %d areas for low memory corruption\n",
num_scan_areas);
if (num_scan_areas)
printk(KERN_INFO "Scanning %d areas for low memory corruption\n", num_scan_areas);
}


Expand Down Expand Up @@ -143,12 +143,12 @@ static void check_corruption(struct work_struct *dummy)
{
check_for_bios_corruption();
schedule_delayed_work(&bios_check_work,
round_jiffies_relative(corruption_check_period*HZ));
round_jiffies_relative(corruption_check_period*HZ));
}

static int start_periodic_check_for_corruption(void)
{
if (!memory_corruption_check || corruption_check_period == 0)
if (!num_scan_areas || !memory_corruption_check || corruption_check_period == 0)
return 0;

printk(KERN_INFO "Scanning for low memory corruption every %d seconds\n",
Expand Down

0 comments on commit a7bd1da

Please sign in to comment.