[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] 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.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
 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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.