[PATCH -next] mn10300: Declare __pfn_to_phys() to fix build error

From: Guenter Roeck
Date: Sat Jan 09 2016 - 16:31:35 EST


__pfn_to_phys() was introduced with commit 8b79eb6f5b53e ("libnvdimm, pfn,
pmem: allocate memmap array in persistent memory") but not declared for
mn10300. This results in the following build error.

mm/page_alloc.c: In function 'memmap_init_zone':
mm/page_alloc.c:4610:9: error: implicit declaration of function '__pfn_to_phys'

Fixes: 8b79eb6f5b53e ("libnvdimm, pfn, pmem: allocate memmap array in persistent memory")
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
---
arch/mn10300/include/asm/page.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/mn10300/include/asm/page.h b/arch/mn10300/include/asm/page.h
index 8288e124165b..3810a6f740fd 100644
--- a/arch/mn10300/include/asm/page.h
+++ b/arch/mn10300/include/asm/page.h
@@ -107,6 +107,7 @@ static inline int get_order(unsigned long size)
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
#define pfn_to_page(pfn) (mem_map + ((pfn) - __pfn_disp))
#define page_to_pfn(page) ((unsigned long)((page) - mem_map) + __pfn_disp)
+#define __pfn_to_phys(pfn) PFN_PHYS(pfn)

#define pfn_valid(pfn) \
({ \
--
2.1.4