Skip to content

Commit

Permalink
x86: work around MTRR mask setting, v2
Browse files Browse the repository at this point in the history
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: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Aug 22, 2008
1 parent c4bd1fd commit 9754a5b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/x86/kernel/cpu/mtrr/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,12 @@ static void generic_get_mtrr(unsigned int reg, unsigned long *base,
tmp |= ~((1<<(hi - 1)) - 1);

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;
}
}
Expand Down

0 comments on commit 9754a5b

Please sign in to comment.