Skip to contentSkip to conversation

mm: fix early_memremap_ro() for all architectures

PATCH New Juergen Gross 1 participant 1 message Jun 11, 2015 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: fix early_memremap_ro() for all architectures

Commit 709294226f7f ("mm: provide early_memremap_ro to establish read-only mapping") broke building on some architectures like arm32 by requiring PAGE_KERNEL_RO. On architectures with that macro not defined fall back to R/W mappings.

---
 include/asm-generic/fixmap.h | 4 ++++
 1 file changed, 4 insertions(+)
include/asm-generic/fixmap.h +4 -0
index d8cc637..18d261b 100644
@@ -47,7 +47,11 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr)
 #define FIXMAP_PAGE_NORMAL PAGE_KERNEL
 #endif
 #ifndef FIXMAP_PAGE_RO
+#ifdef PAGE_KERNEL_RO
 #define FIXMAP_PAGE_RO PAGE_KERNEL_RO
+#else
+#define FIXMAP_PAGE_RO PAGE_KERNEL
+#endif
 #endif
 #ifndef FIXMAP_PAGE_NOCACHE
 #define FIXMAP_PAGE_NOCACHE PAGE_KERNEL_NOCACHE
Signature · 1 line
2.1.4