diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:35 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:35 -0500 |
commit | cd7d72bb27a8c7502a602bdc299f1bb0a9357975 (patch) | |
tree | b945474a792a60a175222068987b9eb5623f2fec /arch | |
parent | 9a1b62fe858ba6780a9aeb4ab5f7751038a6c15d (diff) |
x86: improve MTRR trimming messages
improve the MTTR trimming messages and also trigger a WARN_ON()
so that kerneloops.org can pick it up and categorize it.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/mtrr/main.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index ac4b6338f3f4..715919582657 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -706,20 +706,17 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn) | |||
706 | 706 | ||
707 | /* kvm/qemu doesn't have mtrr set right, don't trim them all */ | 707 | /* kvm/qemu doesn't have mtrr set right, don't trim them all */ |
708 | if (!highest_addr) { | 708 | if (!highest_addr) { |
709 | printk(KERN_WARNING "***************\n"); | 709 | printk(KERN_WARNING "WARNING: strange, CPU MTRRs all blank?\n"); |
710 | printk(KERN_WARNING "**** WARNING: likely strange cpu\n"); | 710 | WARN_ON(1); |
711 | printk(KERN_WARNING "**** MTRRs all blank, cpu in qemu?\n"); | ||
712 | printk(KERN_WARNING "***************\n"); | ||
713 | return 0; | 711 | return 0; |
714 | } | 712 | } |
715 | 713 | ||
716 | if ((highest_addr >> PAGE_SHIFT) < end_pfn) { | 714 | if ((highest_addr >> PAGE_SHIFT) < end_pfn) { |
717 | printk(KERN_WARNING "***************\n"); | 715 | printk(KERN_WARNING "WARNING: BIOS bug: CPU MTRRs don't cover" |
718 | printk(KERN_WARNING "**** WARNING: likely BIOS bug\n"); | 716 | " all of memory, losing %LdMB of RAM.\n", |
719 | printk(KERN_WARNING "**** MTRRs don't cover all of " | 717 | (((u64)end_pfn << PAGE_SHIFT) - highest_addr) >> 20); |
720 | "memory, trimmed %ld pages\n", end_pfn - | 718 | |
721 | (highest_addr >> PAGE_SHIFT)); | 719 | WARN_ON(1); |
722 | printk(KERN_WARNING "***************\n"); | ||
723 | 720 | ||
724 | printk(KERN_INFO "update e820 for mtrr\n"); | 721 | printk(KERN_INFO "update e820 for mtrr\n"); |
725 | trim_start = highest_addr; | 722 | trim_start = highest_addr; |