]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: mtrr_cleanup: print out correct type v2
authorYinghai Lu <yhlu.kernel@gmail.com>
Sun, 5 Oct 2008 02:34:18 +0000 (19:34 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Sun, 5 Oct 2008 03:07:14 +0000 (20:07 -0700)
Print out the correct type when the Write Protected (WP) type is seen.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/kernel/cpu/mtrr/main.c

index 406074c46f1ed3e84488763927e43b630c49e2da..9086b38fbabe4aec6a75c19e1df6af7ac3078c66 100644 (file)
@@ -1273,12 +1273,14 @@ static int __init mtrr_cleanup(unsigned address_bits)
                size_base = to_size_factor(size_base, &size_factor),
                start_base = range_state[i].base_pfn << (PAGE_SHIFT - 10);
                start_base = to_size_factor(start_base, &start_factor),
+               type = range_state[i].type;
 
                printk(KERN_DEBUG "reg %d, base: %ld%cB, range: %ld%cB, type %s\n",
                        i, start_base, start_factor,
                        size_base, size_factor,
                        (type == MTRR_TYPE_UNCACHABLE) ? "UC" :
-                           ((type == MTRR_TYPE_WRBACK) ? "WB" : "Other")
+                           ((type == MTRR_TYPE_WRPROT) ? "WP" :
+                            ((type == MTRR_TYPE_WRBACK) ? "WB" : "Other"))
                        );
        }