Skip to content

Commit a7bd1da

Browse files
Naga ChumbalkarIngo Molnar
authored andcommitted
x86: Don't check for BIOS corruption in first 64K when there's no need 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 <[email protected]> Cc: <[email protected]> LKML-Reference: <20110225202838.2229.71011.sendpatchset@nchumbalkar.americas.hpqcorp.net> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 5471262 commit a7bd1da

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

arch/x86/kernel/check.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ void __init setup_bios_corruption_check(void)
106106
addr += size;
107107
}
108108

109-
printk(KERN_INFO "Scanning %d areas for low memory corruption\n",
110-
num_scan_areas);
109+
if (num_scan_areas)
110+
printk(KERN_INFO "Scanning %d areas for low memory corruption\n", num_scan_areas);
111111
}
112112

113113

@@ -143,12 +143,12 @@ static void check_corruption(struct work_struct *dummy)
143143
{
144144
check_for_bios_corruption();
145145
schedule_delayed_work(&bios_check_work,
146-
round_jiffies_relative(corruption_check_period*HZ));
146+
round_jiffies_relative(corruption_check_period*HZ));
147147
}
148148

149149
static int start_periodic_check_for_corruption(void)
150150
{
151-
if (!memory_corruption_check || corruption_check_period == 0)
151+
if (!num_scan_areas || !memory_corruption_check || corruption_check_period == 0)
152152
return 0;
153153

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

0 commit comments

Comments
 (0)