提交 9754a5b8 编写于 作者: I Ingo Molnar

x86: work around MTRR mask setting, v2

improve the debug printout:

- make it actually display something
- print it only once

would be nice to have a WARN_ONCE() facility, to feed such things to
kerneloops.org.
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 c4bd1fda
...@@ -401,7 +401,12 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base, ...@@ -401,7 +401,12 @@ 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) {
WARN_ON("mtrr: your BIOS has set up an incorrect mask, fixing it up.\n"); static int once = 1;
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.
先完成此消息的编辑!
想要评论请 注册