mirror of https://gitee.com/openkylin/linux.git
x86: use WARN_ONCE in workaround for mtrr mask
so could help catch attention about bug in bios about mtrr mask setting. WARN_ONCE got into mainline already, lets use it. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
0b88641f1b
commit
16dc552f35
|
@ -401,12 +401,7 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base,
|
|||
tmp |= ~((1<<(hi - 1)) - 1);
|
||||
|
||||
if (tmp != mask_lo) {
|
||||
static int once = 1;
|
||||
|
||||
if (once) {
|
||||
printk(KERN_INFO "mtrr: your BIOS has set up an incorrect mask, fixing it up.\n");
|
||||
once = 0;
|
||||
}
|
||||
WARN_ONCE(1, KERN_INFO "mtrr: your BIOS has set up an incorrect mask, fixing it up.\n");
|
||||
mask_lo = tmp;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue