xtensa: implement pgprot_noncached
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 11 Sep 2014 04:05:21 +0000 (21:05 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Sun, 5 Oct 2014 23:23:50 +0000 (03:23 +0400)
The default pgprot_noncached doesn't do anything. This leads to issues
when drivers rely on it to disable caching in userspace mappings.
Implement pgprot_noncached properly so that caching of userspace mappings
could be controlled.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/include/asm/pgtable.h

index b2173e5..0383aed 100644 (file)
@@ -277,6 +277,8 @@ static inline pte_t pte_mkwrite(pte_t pte)
 static inline pte_t pte_mkspecial(pte_t pte)
        { return pte; }
 
+#define pgprot_noncached(prot) (__pgprot(pgprot_val(prot) & ~_PAGE_CA_MASK))
+
 /*
  * Conversion functions: convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.