Commit cd7d72bb authored by Ingo Molnar's avatar Ingo Molnar

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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 9a1b62fe
...@@ -706,20 +706,17 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn) ...@@ -706,20 +706,17 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn)
/* kvm/qemu doesn't have mtrr set right, don't trim them all */ /* kvm/qemu doesn't have mtrr set right, don't trim them all */
if (!highest_addr) { if (!highest_addr) {
printk(KERN_WARNING "***************\n"); printk(KERN_WARNING "WARNING: strange, CPU MTRRs all blank?\n");
printk(KERN_WARNING "**** WARNING: likely strange cpu\n"); WARN_ON(1);
printk(KERN_WARNING "**** MTRRs all blank, cpu in qemu?\n");
printk(KERN_WARNING "***************\n");
return 0; return 0;
} }
if ((highest_addr >> PAGE_SHIFT) < end_pfn) { if ((highest_addr >> PAGE_SHIFT) < end_pfn) {
printk(KERN_WARNING "***************\n"); printk(KERN_WARNING "WARNING: BIOS bug: CPU MTRRs don't cover"
printk(KERN_WARNING "**** WARNING: likely BIOS bug\n"); " all of memory, losing %LdMB of RAM.\n",
printk(KERN_WARNING "**** MTRRs don't cover all of " (((u64)end_pfn << PAGE_SHIFT) - highest_addr) >> 20);
"memory, trimmed %ld pages\n", end_pfn -
(highest_addr >> PAGE_SHIFT)); WARN_ON(1);
printk(KERN_WARNING "***************\n");
printk(KERN_INFO "update e820 for mtrr\n"); printk(KERN_INFO "update e820 for mtrr\n");
trim_start = highest_addr; trim_start = highest_addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment