m68k: Declare __pfn_to_phys() for nommu case to fix build errors
Subsystems (2)
PATCH 1/1 m68k: Declare __pfn_to_phys() for nommu case to fix build errors
__pfn_to_phys() was introduced with commit 8b79eb6f5b53e ("libnvdimm, pfn,
pmem: allocate memmap array in persistent memory") but not declared for m68k in nommu configurations. 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'
--- arch/m68k/include/asm/page_no.h | 2 ++ 1 file changed, 2 insertions(+)
arch/m68k/include/asm/page_no.h +2 -0
@@ -19,6 +19,8 @@ extern unsigned long memory_end;#define __pa (vaddr) ((unsigned long)(vaddr))#define __va (paddr) ((void *)(paddr)) +#define __pfn_to_phys (pfn) PFN_PHYS(pfn) +#define virt_to_pfn (kaddr) (__pa(kaddr) >> PAGE_SHIFT)#define pfn_to_virt (pfn) __va((pfn) << PAGE_SHIFT)
Signature · 1 line
2.1.4
Geert Uytterhoeven
maintainerHi Günther,
Thanks for reporting!
Quoted 1 line · Guenter Roeck
__pfn_to_phys()was introduced with commit8b79eb6f5b53e("libnvdimm, pfn,
Was it?
Quoted 2 lines
pmem: allocate memmap array in persistent memory") but not declared for m68k in nommu configurations. This results in the following build error.
It used to fail on m68k with mmu, too, cfr. (badly-described) commit 7a6101c076fa6ae6 ("m68k: fix build failure").
Quoted 16 lines
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 <[email protected]>Cc Andrew Morton <[email protected]>Signed-off-by Guenter Roeck <[email protected]>--- arch/m68k/include/asm/page_no.h | 2 ++ 1 file changed, 2 insertions(+)arch/m68k/include/asm/page_no.h +0
-0
arch/m68k/include/asm/page_no.h extern unsigned long memory_end; · line 25
Quoted 7 lines
arch/m68k/include/asm/page_no.h +2
-0@@ -19,6 +19,8 @@ extern unsigned long memory_end;#define __pa (vaddr) ((unsigned long)(vaddr))#define __va (paddr) ((void *)(paddr)) +#define __pfn_to_phys (pfn) PFN_PHYS(pfn) +#define virt_to_pfn (kaddr) (__pa(kaddr) >> PAGE_SHIFT)#define pfn_to_virt (pfn) __va((pfn) << PAGE_SHIFT)
To avoid adding the same line(s) to page_mm.h and page_no.h, I'm gonna apply Sudip's patch to page.h instead of page_mm.h.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds