]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: work around MTRR mask setting, v2
authorIngo Molnar <mingo@elte.hu>
Fri, 22 Aug 2008 06:22:23 +0000 (08:22 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 22 Aug 2008 12:12:31 +0000 (14:12 +0200)
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>
arch/x86/kernel/cpu/mtrr/generic.c

index 43102e03e2d169e5ded91d4eea024b6ca88e4521..cb7d3b6a80eb879670bd8a74864d01b587561dec 100644 (file)
@@ -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;
                }
        }