diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-22 00:06:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-22 00:06:51 -0400 |
commit | 8b53b57576292b92b27769f9e213df19b6e57786 (patch) | |
tree | cd851ce4fa71b2653f120d7f11a9c6cbcf311b19 /arch/x86/mm/pageattr.c | |
parent | ab7e79243746e2a9c5f00243e60108189c44c9eb (diff) | |
parent | 38cc1c3df77c1bb739a4766788eb9fa49f16ffdf (diff) |
Merge branch 'x86/urgent' into x86/pat
Conflicts:
arch/x86/mm/pageattr.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r-- | arch/x86/mm/pageattr.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 041e81ef673a..1785591808bd 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -59,13 +59,19 @@ static void split_page_count(int level) | |||
59 | 59 | ||
60 | int arch_report_meminfo(char *page) | 60 | int arch_report_meminfo(char *page) |
61 | { | 61 | { |
62 | int n = sprintf(page, "DirectMap4k: %8lu\n" | 62 | int n = sprintf(page, "DirectMap4k: %8lu kB\n", |
63 | "DirectMap2M: %8lu\n", | 63 | direct_pages_count[PG_LEVEL_4K] << 2); |
64 | direct_pages_count[PG_LEVEL_4K], | 64 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) |
65 | direct_pages_count[PG_LEVEL_2M]); | 65 | n += sprintf(page + n, "DirectMap2M: %8lu kB\n", |
66 | direct_pages_count[PG_LEVEL_2M] << 11); | ||
67 | #else | ||
68 | n += sprintf(page + n, "DirectMap4M: %8lu kB\n", | ||
69 | direct_pages_count[PG_LEVEL_2M] << 12); | ||
70 | #endif | ||
66 | #ifdef CONFIG_X86_64 | 71 | #ifdef CONFIG_X86_64 |
67 | n += sprintf(page + n, "DirectMap1G: %8lu\n", | 72 | if (direct_gbpages) |
68 | direct_pages_count[PG_LEVEL_1G]); | 73 | n += sprintf(page + n, "DirectMap1G: %8lu kB\n", |
74 | direct_pages_count[PG_LEVEL_1G] << 20); | ||
69 | #endif | 75 | #endif |
70 | return n; | 76 | return n; |
71 | } | 77 | } |
@@ -636,9 +642,8 @@ repeat: | |||
636 | if (!pte_val(old_pte)) { | 642 | if (!pte_val(old_pte)) { |
637 | if (!primary) | 643 | if (!primary) |
638 | return 0; | 644 | return 0; |
639 | printk(KERN_WARNING "CPA: called for zero pte. " | 645 | WARN(1, KERN_WARNING "CPA: called for zero pte. " |
640 | "vaddr = %lx cpa->vaddr = %lx\n", address, | 646 | "vaddr = %lx cpa->vaddr = %lx\n", address, |
641 | WARN_ON(1); | ||
642 | *cpa->vaddr); | 647 | *cpa->vaddr); |
643 | return -EINVAL; | 648 | return -EINVAL; |
644 | } | 649 | } |
@@ -927,7 +932,7 @@ int set_memory_uc(unsigned long addr, int numpages) | |||
927 | /* | 932 | /* |
928 | * for now UC MINUS. see comments in ioremap_nocache() | 933 | * for now UC MINUS. see comments in ioremap_nocache() |
929 | */ | 934 | */ |
930 | if (reserve_memtype(addr, addr + numpages * PAGE_SIZE, | 935 | if (reserve_memtype(__pa(addr), __pa(addr) + numpages * PAGE_SIZE, |
931 | _PAGE_CACHE_UC_MINUS, NULL)) | 936 | _PAGE_CACHE_UC_MINUS, NULL)) |
932 | return -EINVAL; | 937 | return -EINVAL; |
933 | 938 | ||
@@ -967,7 +972,7 @@ int set_memory_wc(unsigned long addr, int numpages) | |||
967 | if (!pat_enabled) | 972 | if (!pat_enabled) |
968 | return set_memory_uc(addr, numpages); | 973 | return set_memory_uc(addr, numpages); |
969 | 974 | ||
970 | if (reserve_memtype(addr, addr + numpages * PAGE_SIZE, | 975 | if (reserve_memtype(__pa(addr), __pa(addr) + numpages * PAGE_SIZE, |
971 | _PAGE_CACHE_WC, NULL)) | 976 | _PAGE_CACHE_WC, NULL)) |
972 | return -EINVAL; | 977 | return -EINVAL; |
973 | 978 | ||
@@ -983,7 +988,7 @@ int _set_memory_wb(unsigned long addr, int numpages) | |||
983 | 988 | ||
984 | int set_memory_wb(unsigned long addr, int numpages) | 989 | int set_memory_wb(unsigned long addr, int numpages) |
985 | { | 990 | { |
986 | free_memtype(addr, addr + numpages * PAGE_SIZE); | 991 | free_memtype(__pa(addr), __pa(addr) + numpages * PAGE_SIZE); |
987 | 992 | ||
988 | return _set_memory_wb(addr, numpages); | 993 | return _set_memory_wb(addr, numpages); |
989 | } | 994 | } |