[patch 40/42] x86: work around MTRR mask setting, v2

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Wednesday, September 3, 2008 - 10:26 am

2.6.26-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Ingo Molnar <mingo@elte.hu>

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 |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/arch/x86/kernel/cpu/mtrr/generic.c
+++ b/arch/x86/kernel/cpu/mtrr/generic.c
@@ -387,7 +387,12 @@ static void generic_get_mtrr(unsigned in
 		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;
 		}
 	}

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/42] 2.6.26-stable review, Greg KH, (Wed Sep 3, 10:24 am)
[patch 01/42] cramfs: fix named-pipe handling, Greg KH, (Wed Sep 3, 10:25 am)
[patch 03/42] eeepc-laptop: fix use after free, Greg KH, (Wed Sep 3, 10:25 am)
[patch 07/42] x86: work around MTRR mask setting, Greg KH, (Wed Sep 3, 10:25 am)
[patch 13/42] forcedeth: fix checksum flag, Greg KH, (Wed Sep 3, 10:25 am)
[patch 14/42] atl1: disable TSO by default, Greg KH, (Wed Sep 3, 10:25 am)
[patch 24/42] pkt_sched: Fix actions referencing, Greg KH, (Wed Sep 3, 10:26 am)
[patch 36/42] tg3: Fix firmware event timeouts, Greg KH, (Wed Sep 3, 10:26 am)
[patch 40/42] x86: work around MTRR mask setting, v2, Greg KH, (Wed Sep 3, 10:26 am)
[patch 41/42] KVM: MMU: Fix torn shadow pte, Greg KH, (Wed Sep 3, 10:26 am)
Re: [patch 29/42] net: Unbreak userspace which includes li ..., Stefan Lippers-Hollmann, (Wed Sep 3, 12:16 pm)
Re: [patch 00/42] 2.6.26-stable review, Henrique de Moraes H ..., (Wed Sep 3, 7:39 pm)
Re: [patch 00/42] 2.6.26-stable review, Andi Kleen, (Thu Sep 4, 5:21 am)
Re: [patch 00/42] 2.6.26-stable review, Milan Broz, (Thu Sep 4, 5:28 am)
Re: [patch 00/42] 2.6.26-stable review, Andi Kleen, (Thu Sep 4, 6:58 am)
Re: [patch 00/42] 2.6.26-stable review, Pavel Machek, (Fri Sep 12, 7:22 am)
Re: [patch 00/42] 2.6.26-stable review, Andi Kleen, (Fri Sep 12, 8:37 am)
Re: [patch 00/42] 2.6.26-stable review, Henrique de Moraes H ..., (Fri Sep 12, 12:46 pm)
Re: [patch 00/42] 2.6.26-stable review, Pavel Machek, (Sat Sep 13, 9:56 am)