@@ -3,6 +3,7 @@
#define _ASM_EARLY_IOREMAP_H_
#include <linux/types.h>
+#include <asm/fixmap.h>
/*
* early_ioremap() and early_iounmap() are for temporary early boot-time
@@ -19,6 +20,14 @@ extern void *early_memremap_prot(resource_size_t phys_addr,
extern void early_iounmap(void __iomem *addr, unsigned long size);
extern void early_memunmap(void *addr, unsigned long size);
+/*
+ * Weak function called by early_memremap and early_memremap_ro. It does
+ * nothing, but architectures may provide their own version to handle
+ * memory encryption.
+ */
+extern pgprot_t early_memremap_pgprot_adjust(resource_size_t phys_addr,
+ unsigned long size, pgprot_t prot);
+
/*
* Weak function called by early_ioremap_reset(). It does nothing, but
* architectures may provide their own version to do any needed cleanups.
make W=1 generates the following warning for mm/early_ioremap.c mm/early_ioremap.c:34:24: warning: no previous prototype for ‘early_memremap_pgprot_adjust’ [-Wmissing-prototypes] pgprot_t __init __weak early_memremap_pgprot_adjust(resource_size_t phys_addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ The weak functions that can be overridden by architectures are declared in include/asm-generic/early_ioremap.h so add the prototype there. The asm/fixmap.h header is need for pgprot_t. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> --- include/asm-generic/early_ioremap.h | 9 +++++++++ 1 file changed, 9 insertions(+)