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.

Signed-off-by: Juergen Gross <jgr...@suse.com>
---
 include/asm-generic/fixmap.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/asm-generic/fixmap.h b/include/asm-generic/fixmap.h
index d8cc637..18d261b 100644
--- a/include/asm-generic/fixmap.h
+++ b/include/asm-generic/fixmap.h
@@ -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
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to