]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
x86: work around MTRR mask setting, v2
authorIngo Molnar <mingo@elte.hu>
Wed, 3 Sep 2008 00:54:10 +0000 (17:54 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 8 Sep 2008 11:44:32 +0000 (04:44 -0700)
commit 9754a5b840a209bc1f192d59f63e81b698a55ac8 upstream

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: Ingo Molnar <mingo@elte.hu>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/cpu/mtrr/generic.c

index 10a46dec1f158eb96749f695f2257ff111c1cb36..745b974d5c958c3c217377c621c949093a01c38d 100644 (file)
@@ -387,7 +387,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;
                }
        }