Skip to content

Commit

Permalink
x86: improve MTRR trimming messages
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
Ingo Molnar committed Jan 30, 2008
1 parent 9a1b62f commit cd7d72b
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions arch/x86/kernel/cpu/mtrr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
if (!highest_addr) {
printk(KERN_WARNING "***************\n");
printk(KERN_WARNING "**** WARNING: likely strange cpu\n");
printk(KERN_WARNING "**** MTRRs all blank, cpu in qemu?\n");
printk(KERN_WARNING "***************\n");
printk(KERN_WARNING "WARNING: strange, CPU MTRRs all blank?\n");
WARN_ON(1);
return 0;
}

if ((highest_addr >> PAGE_SHIFT) < end_pfn) {
printk(KERN_WARNING "***************\n");
printk(KERN_WARNING "**** WARNING: likely BIOS bug\n");
printk(KERN_WARNING "**** MTRRs don't cover all of "
"memory, trimmed %ld pages\n", end_pfn -
(highest_addr >> PAGE_SHIFT));
printk(KERN_WARNING "***************\n");
printk(KERN_WARNING "WARNING: BIOS bug: CPU MTRRs don't cover"
" all of memory, losing %LdMB of RAM.\n",
(((u64)end_pfn << PAGE_SHIFT) - highest_addr) >> 20);

WARN_ON(1);

printk(KERN_INFO "update e820 for mtrr\n");
trim_start = highest_addr;
Expand Down

0 comments on commit cd7d72b

Please sign in to comment.