]> git.hungrycats.org Git - linux/commitdiff
x86: work around MTRR mask setting, v2
authorIngo Molnar <mingo@elte.hu>
Fri, 22 Aug 2008 06:22:23 +0000 (08:22 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 22 Oct 2008 21:05:17 +0000 (14:05 -0700)
commit 9754a5b840a209bc1f192d59f63e81b698a55ac8 upstream

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: S.Çağlar Onur <caglar@pardus.org.tr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/cpu/mtrr/generic.c

index f49c9706b9284a1605c4e246ac16c132b9d591bd..ca2180800d44502362a1d359fe4294d37e9059b6 100644 (file)
@@ -251,7 +251,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;
                }
        }