From: Juergen Gross Subject: [PATCH] mm: fix early_memremap_ro() for all architectures Date: Thu, 11 Jun 2015 06:26:18 +0200 Message-ID: <1433996778-27057-1-git-send-email-jgross@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com, konrad.wilk@oracle.com, david.vrabel@citrix.com, boris.ostrovsky@oracle.com Cc: Juergen Gross List-Id: xen-devel@lists.xenproject.org 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 --- 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