]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/mm/pat.c
x86: PAT: add pgprot_writecombine() interface for drivers - v3
[linux-2.6-omap-h63xx.git] / arch / x86 / mm / pat.c
index 1069ffecf77d87fdc933adaef150603725bd04f8..d5254bae84f4907e7ea5af706cde0e72647d63a7 100644 (file)
@@ -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 */