arm64: Use Normal NonCacheable memory for writecombine
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 29 Nov 2013 10:56:14 +0000 (10:56 +0000)
committerJiri Slaby <jslaby@suse.cz>
Mon, 31 Mar 2014 12:22:22 +0000 (14:22 +0200)
commit 4f00130b70e5eee813cc7bc298e0f3fdf79673cc upstream.

This provides better performance compared to Device GRE and also allows
unaligned accesses. Such memory is intended to be used with standard RAM
(e.g. framebuffers) and not I/O.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/arm64/include/asm/pgtable.h

index 965c28ff7b3b3eb0a7de3e721053c706a037813c..82d95a7e94661575cb3cad305575b1d85acd817b 100644 (file)
@@ -255,7 +255,7 @@ static inline int has_transparent_hugepage(void)
 #define pgprot_noncached(prot) \
        __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE))
 #define pgprot_writecombine(prot) \
-       __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_GRE))
+       __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC))
 #define pgprot_dmacoherent(prot) \
        __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC))
 #define __HAVE_PHYS_MEM_ACCESS_PROT