diff options
author | venkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com> | 2008-12-18 20:41:32 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-12-18 22:30:16 +0100 |
commit | 2520bd3123c00272f818a176c92d03c7d0a113d6 (patch) | |
tree | 1c5f3e47243d77573cb4933dadc5224d2fb32686 /arch/x86/mm/pat.c | |
parent | x86: PAT: change pgprot_noncached to uc_minus instead of strong uc - v3 (diff) | |
download | linux-2520bd3123c00272f818a176c92d03c7d0a113d6.tar.xz linux-2520bd3123c00272f818a176c92d03c7d0a113d6.zip |
x86: PAT: add pgprot_writecombine() interface for drivers - v3
Impact: New mm functionality.
Add pgprot_writecombine. pgprot_writecombine will be aliased to
pgprot_noncached when not supported by the architecture.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/mm/pat.c')
-rw-r--r-- | arch/x86/mm/pat.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 1069ffecf77d..d5254bae84f4 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c @@ -832,6 +832,14 @@ void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn, } } +pgprot_t pgprot_writecombine(pgprot_t prot) +{ + if (pat_enabled) + return __pgprot(pgprot_val(prot) | _PAGE_CACHE_WC); + else + return pgprot_noncached(prot); +} + #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_X86_PAT) /* get Nth element of the linked list */ |