mm: fix early_memremap_ro() for all architectures
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.
Signed-off-by Juergen Gross <[email protected]>
--- include/asm-generic/fixmap.h | 4 ++++ 1 file changed, 4 insertions(+)
include/asm-generic/fixmap.h +4 -0
@@ -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