From 4996ed5efbb2d7cd38a17fe456f8da820f1a1ef3 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 10 Jul 2018 16:12:12 +0200 Subject: ARM: MMU: fix arch_remap_range() across section boundaries Fixes: e3e54c6441 ARM: mmu: Implement on-demand PTE allocation PGD_FLAGS_WC_V7 lacks the PMD_TYPE_SECT and PMD_SECT_BUFFERABLE flags. Without them a dma_alloc_writecombine() creates an invalid section when it crosses a section boundary. Signed-off-by: Sascha Hauer Reviewed-by: Lucas Stach --- arch/arm/cpu/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index 7e2e5bf7e0..ae189ecdeb 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -61,7 +61,7 @@ static inline void tlb_invalidate(void) #define PTE_FLAGS_UNCACHED_V7 (0) #define PTE_FLAGS_CACHED_V4 (PTE_SMALL_AP_UNO_SRW | PTE_BUFFERABLE | PTE_CACHEABLE) #define PTE_FLAGS_UNCACHED_V4 PTE_SMALL_AP_UNO_SRW -#define PGD_FLAGS_WC_V7 PMD_SECT_TEX(1) +#define PGD_FLAGS_WC_V7 (PMD_SECT_TEX(1) | PMD_TYPE_SECT | PMD_SECT_BUFFERABLE) /* * PTE flags to set cached and uncached areas. -- cgit v1.2.3