提交 16dc552f 编写于 作者: Y Yinghai Lu 提交者: Ingo Molnar

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: NYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 0b88641f
...@@ -401,12 +401,7 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base, ...@@ -401,12 +401,7 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base,
tmp |= ~((1<<(hi - 1)) - 1); tmp |= ~((1<<(hi - 1)) - 1);
if (tmp != mask_lo) { if (tmp != mask_lo) {
static int once = 1; WARN_ONCE(1, KERN_INFO "mtrr: your BIOS has set up an incorrect mask, fixing it up.\n");
if (once) {
printk(KERN_INFO "mtrr: your BIOS has set up an incorrect mask, fixing it up.\n");
once = 0;
}
mask_lo = tmp; mask_lo = tmp;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册