aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pat.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/pat.c')
-rw-r--r--arch/x86/mm/pat.c8
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,
832 } 832 }
833} 833}
834 834
835pgprot_t pgprot_writecombine(pgprot_t prot)
836{
837 if (pat_enabled)
838 return __pgprot(pgprot_val(prot) | _PAGE_CACHE_WC);
839 else
840 return pgprot_noncached(prot);
841}
842
835#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_X86_PAT) 843#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_X86_PAT)
836 844
837/* get Nth element of the linked list */ 845/* get Nth element of the linked list */