Skip to content

Commit 4f00130

Browse files
committed
arm64: Use Normal NonCacheable memory for writecombine
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 <[email protected]>
1 parent 2dacab7 commit 4f00130

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ static inline int has_transparent_hugepage(void)
254254
#define pgprot_noncached(prot) \
255255
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE))
256256
#define pgprot_writecombine(prot) \
257-
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_GRE))
257+
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC))
258258
#define pgprot_dmacoherent(prot) \
259259
__pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC))
260260
#define __HAVE_PHYS_MEM_ACCESS_PROT

0 commit comments

Comments
 (0)