diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-09-19 11:45:04 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-22 13:09:56 +0200 |
commit | 16dc552f35bc0ec6fec8ef83f8032eee352d17f5 (patch) | |
tree | 756f4c2c0aa57dd674df38f59ac2a92312c873c6 | |
parent | 0b88641f1bafdbd087d5e63987a30cc0eadd63b9 (diff) |
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 cb7d3b6a80e..4e8d77f01ee 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; } } |