Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1305364 > unrolled thread

[PATCH -next] m68k: Declare __pfn_to_phys() for nommu case to fix build errors

Started byGuenter Roeck <linux@roeck-us.net>
First post2016-01-09 22:40 +0100
Last post2016-01-10 11:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH -next] m68k: Declare __pfn_to_phys() for nommu case to fix build errors Guenter Roeck <linux@roeck-us.net> - 2016-01-09 22:40 +0100
    Re: [PATCH -next] m68k: Declare __pfn_to_phys() for nommu case to fix  build errors Geert Uytterhoeven <geert@linux-m68k.org> - 2016-01-10 11:00 +0100

#1305364 — [PATCH -next] m68k: Declare __pfn_to_phys() for nommu case to fix build errors

FromGuenter Roeck <linux@roeck-us.net>
Date2016-01-09 22:40 +0100
Subject[PATCH -next] m68k: Declare __pfn_to_phys() for nommu case to fix build errors
Message-ID<qP9oR-2Xj-1@gated-at.bofh.it>
__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'

Fixes: 8b79eb6f5b53e ("libnvdimm, pfn, pmem: allocate memmap array in persistent memory")
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/m68k/include/asm/page_no.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/m68k/include/asm/page_no.h b/arch/m68k/include/asm/page_no.h
index fa7f32d9836b..f389f575b93f 100644
--- a/arch/m68k/include/asm/page_no.h
+++ b/arch/m68k/include/asm/page_no.h
@@ -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)
 
-- 
2.1.4

[toc] | [next] | [standalone]


#1305525 — Re: [PATCH -next] m68k: Declare __pfn_to_phys() for nommu case to fix build errors

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-01-10 11:00 +0100
SubjectRe: [PATCH -next] m68k: Declare __pfn_to_phys() for nommu case to fix build errors
Message-ID<qPkX0-2qS-15@gated-at.bofh.it>
In reply to#1305364
Hi Günther,

Thanks for reporting!

On Sat, Jan 9, 2016 at 10:38 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> __pfn_to_phys() was introduced with commit 8b79eb6f5b53e ("libnvdimm, pfn,

Was it?

> 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").

> 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@intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  arch/m68k/include/asm/page_no.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/m68k/include/asm/page_no.h b/arch/m68k/include/asm/page_no.h
> index fa7f32d9836b..f389f575b93f 100644
> --- a/arch/m68k/include/asm/page_no.h
> +++ b/arch/m68k/include/asm/page_no.h
> @@ -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 -- geert@linux-m68k.org

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web