]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/mm/pageattr.c
Merge branch 'linus' into x86/cleanups
[linux-2.6-omap-h63xx.git] / arch / x86 / mm / pageattr.c
index 0d254adcc82d362c08527265aa6637f46e89a8bb..1b87b76e2d04ffcbaf07fe0b0e4bb535df742471 100644 (file)
@@ -55,13 +55,19 @@ static void split_page_count(int level)
 
 int arch_report_meminfo(char *page)
 {
-       int n = sprintf(page, "DirectMap4k:  %8lu\n"
-                       "DirectMap2M:  %8lu\n",
-                       direct_pages_count[PG_LEVEL_4K],
-                       direct_pages_count[PG_LEVEL_2M]);
+       int n = sprintf(page, "DirectMap4k:  %8lu kB\n",
+                       direct_pages_count[PG_LEVEL_4K] << 2);
+#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
+       n += sprintf(page + n, "DirectMap2M:  %8lu kB\n",
+                       direct_pages_count[PG_LEVEL_2M] << 11);
+#else
+       n += sprintf(page + n, "DirectMap4M:  %8lu kB\n",
+                       direct_pages_count[PG_LEVEL_2M] << 12);
+#endif
 #ifdef CONFIG_X86_64
-       n += sprintf(page + n, "DirectMap1G:  %8lu\n",
-                    direct_pages_count[PG_LEVEL_1G]);
+       if (direct_gbpages)
+               n += sprintf(page + n, "DirectMap1G:  %8lu kB\n",
+                       direct_pages_count[PG_LEVEL_1G] << 20);
 #endif
        return n;
 }
@@ -592,10 +598,9 @@ repeat:
        if (!pte_val(old_pte)) {
                if (!primary)
                        return 0;
-               printk(KERN_WARNING "CPA: called for zero pte. "
+               WARN(1, KERN_WARNING "CPA: called for zero pte. "
                       "vaddr = %lx cpa->vaddr = %lx\n", address,
                       cpa->vaddr);
-               WARN_ON(1);
                return -EINVAL;
        }