diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-09-19 20:45:04 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-22 13:09:56 +0200 |
commit | 16dc552f35bc0ec6fec8ef83f8032eee352d17f5 (patch) | |
tree | 756f4c2c0aa57dd674df38f59ac2a92312c873c6 | |
parent | Merge commit 'v2.6.27-rc7' into x86/debug (diff) | |
download | linux-16dc552f35bc0ec6fec8ef83f8032eee352d17f5.tar.xz linux-16dc552f35bc0ec6fec8ef83f8032eee352d17f5.zip |
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>
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/generic.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index cb7d3b6a80eb..4e8d77f01eeb 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c @@ -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; } } |