diff options
author | venkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com> | 2008-03-18 20:00:14 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:19 -0400 |
commit | 2e5d9c857d4e6c9e7b7d8c8c86a68a7842d213d6 (patch) | |
tree | 6c90c0f9f38ff85e2f42ddc0f4ef0291cdd47d38 /arch/x86/mm/pageattr.c | |
parent | d27554d874c7eeb14c8bfecdc39c3a8618cd8d32 (diff) |
x86: PAT infrastructure patch
Sets up pat_init() infrastructure.
PAT MSR has following setting.
PAT
|PCD
||PWT
|||
000 WB _PAGE_CACHE_WB
001 WC _PAGE_CACHE_WC
010 UC- _PAGE_CACHE_UC_MINUS
011 UC _PAGE_CACHE_UC
We are effectively changing WT from boot time setting to WC.
UC_MINUS is used to provide backward compatibility to existing /dev/mem
users(X).
reserve_memtype and free_memtype are new interfaces for maintaining alias-free
mapping. It is currently implemented in a simple way with a linked list and
not optimized. reserve and free tracks the effective memory type, as a result
of PAT and MTRR setting rather than what is actually requested in PAT.
pat_init piggy backs on mtrr_init as the rules for setting both pat and mtrr
are same.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r-- | arch/x86/mm/pageattr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 6cdfc0fd68be..f7d5ca170c22 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -773,14 +773,14 @@ static inline int change_page_attr_clear(unsigned long addr, int numpages, | |||
773 | int set_memory_uc(unsigned long addr, int numpages) | 773 | int set_memory_uc(unsigned long addr, int numpages) |
774 | { | 774 | { |
775 | return change_page_attr_set(addr, numpages, | 775 | return change_page_attr_set(addr, numpages, |
776 | __pgprot(_PAGE_PCD)); | 776 | __pgprot(_PAGE_CACHE_UC)); |
777 | } | 777 | } |
778 | EXPORT_SYMBOL(set_memory_uc); | 778 | EXPORT_SYMBOL(set_memory_uc); |
779 | 779 | ||
780 | int set_memory_wb(unsigned long addr, int numpages) | 780 | int set_memory_wb(unsigned long addr, int numpages) |
781 | { | 781 | { |
782 | return change_page_attr_clear(addr, numpages, | 782 | return change_page_attr_clear(addr, numpages, |
783 | __pgprot(_PAGE_PCD | _PAGE_PWT)); | 783 | __pgprot(_PAGE_CACHE_MASK)); |
784 | } | 784 | } |
785 | EXPORT_SYMBOL(set_memory_wb); | 785 | EXPORT_SYMBOL(set_memory_wb); |
786 | 786 | ||