linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds
@ 2015-01-20 20:02 Kim Phillips
  2015-01-20 23:01 ` josh
  0 siblings, 1 reply; 18+ messages in thread
From: Kim Phillips @ 2015-01-20 20:02 UTC (permalink / raw)
  To: Andrew Morton, Johannes Weiner, Minchan Kim, Joonsoo Kim,
	Rik van Riel, Josh Triplett, Sasha Levin, Al Viro,
	Konstantin Khlebnikov, Jens Axboe
  Cc: linux-mm, linux-kernel, linuxppc-dev

It's possible to configure DEBUG_PAGEALLOC without PAGE_POISONING on
ppc.  Fix building the generic kernel_map_pages() implementation in
this case:

  LD      init/built-in.o
mm/built-in.o: In function `free_pages_prepare':
mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
mm/built-in.o: In function `prep_new_page':
mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
mm/built-in.o: In function `map_pages':
mm/compaction.c:61: undefined reference to `.kernel_map_pages'
make: *** [vmlinux] Error 1

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
 mm/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/Makefile b/mm/Makefile
index 4bf586e..2956467 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -46,6 +46,7 @@ obj-$(CONFIG_SLOB) += slob.o
 obj-$(CONFIG_MMU_NOTIFIER) += mmu_notifier.o
 obj-$(CONFIG_KSM) += ksm.o
 obj-$(CONFIG_PAGE_POISONING) += debug-pagealloc.o
+obj-$(CONFIG_DEBUG_PAGEALLOC) += debug-pagealloc.o
 obj-$(CONFIG_SLAB) += slab.o
 obj-$(CONFIG_SLUB) += slub.o
 obj-$(CONFIG_KMEMCHECK) += kmemcheck.o
-- 
2.2.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds
  2015-01-20 20:02 [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds Kim Phillips
@ 2015-01-20 23:01 ` josh
  2015-01-21  0:07   ` Andrew Morton
  0 siblings, 1 reply; 18+ messages in thread
From: josh @ 2015-01-20 23:01 UTC (permalink / raw)
  To: Kim Phillips
  Cc: Andrew Morton, Johannes Weiner, Minchan Kim, Joonsoo Kim,
	Rik van Riel, Sasha Levin, Al Viro, Konstantin Khlebnikov,
	Jens Axboe, linux-mm, linux-kernel, linuxppc-dev

On Tue, Jan 20, 2015 at 02:02:00PM -0600, Kim Phillips wrote:
> It's possible to configure DEBUG_PAGEALLOC without PAGE_POISONING on
> ppc.  Fix building the generic kernel_map_pages() implementation in
> this case:
> 
>   LD      init/built-in.o
> mm/built-in.o: In function `free_pages_prepare':
> mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
> mm/built-in.o: In function `prep_new_page':
> mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
> mm/built-in.o: In function `map_pages':
> mm/compaction.c:61: undefined reference to `.kernel_map_pages'
> make: *** [vmlinux] Error 1
> 
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> ---
>  mm/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/Makefile b/mm/Makefile
> index 4bf586e..2956467 100644
> --- a/mm/Makefile
> +++ b/mm/Makefile
> @@ -46,6 +46,7 @@ obj-$(CONFIG_SLOB) += slob.o
>  obj-$(CONFIG_MMU_NOTIFIER) += mmu_notifier.o
>  obj-$(CONFIG_KSM) += ksm.o
>  obj-$(CONFIG_PAGE_POISONING) += debug-pagealloc.o
> +obj-$(CONFIG_DEBUG_PAGEALLOC) += debug-pagealloc.o

Does it work correctly to list the same object file twice?  Doesn't seem
like it would.  Shouldn't this do something like the following instead:

ifneq ($(CONFIG_DEBUG_PAGEALLOC)$(CONFIG_PAGE_POISONING),)
obj-y += debug-pagealloc.o
endif

?

>  obj-$(CONFIG_SLAB) += slab.o
>  obj-$(CONFIG_SLUB) += slub.o
>  obj-$(CONFIG_KMEMCHECK) += kmemcheck.o
> -- 
> 2.2.2
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds
  2015-01-20 23:01 ` josh
@ 2015-01-21  0:07   ` Andrew Morton
  2015-01-21 12:57     ` Akinobu Mita
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew Morton @ 2015-01-21  0:07 UTC (permalink / raw)
  To: josh
  Cc: Kim Phillips, Johannes Weiner, Minchan Kim, Joonsoo Kim,
	Rik van Riel, Sasha Levin, Al Viro, Konstantin Khlebnikov,
	Jens Axboe, linux-mm, linux-kernel, linuxppc-dev, Akinobu Mita

On Tue, 20 Jan 2015 15:01:50 -0800 josh@joshtriplett.org wrote:

> On Tue, Jan 20, 2015 at 02:02:00PM -0600, Kim Phillips wrote:
> > It's possible to configure DEBUG_PAGEALLOC without PAGE_POISONING on
> > ppc.  Fix building the generic kernel_map_pages() implementation in
> > this case:
> > 
> >   LD      init/built-in.o
> > mm/built-in.o: In function `free_pages_prepare':
> > mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
> > mm/built-in.o: In function `prep_new_page':
> > mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
> > mm/built-in.o: In function `map_pages':
> > mm/compaction.c:61: undefined reference to `.kernel_map_pages'
> > make: *** [vmlinux] Error 1
> > 
> > Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> > ---
> >  mm/Makefile | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/mm/Makefile b/mm/Makefile
> > index 4bf586e..2956467 100644
> > --- a/mm/Makefile
> > +++ b/mm/Makefile
> > @@ -46,6 +46,7 @@ obj-$(CONFIG_SLOB) += slob.o
> >  obj-$(CONFIG_MMU_NOTIFIER) += mmu_notifier.o
> >  obj-$(CONFIG_KSM) += ksm.o
> >  obj-$(CONFIG_PAGE_POISONING) += debug-pagealloc.o
> > +obj-$(CONFIG_DEBUG_PAGEALLOC) += debug-pagealloc.o
> 
> Does it work correctly to list the same object file twice?  Doesn't seem
> like it would.  Shouldn't this do something like the following instead:
> 
> ifneq ($(CONFIG_DEBUG_PAGEALLOC)$(CONFIG_PAGE_POISONING),)
> obj-y += debug-pagealloc.o
> endif
> 

I expect it's a Kconfig problem.  DEBUG_PAGEALLOC should be selecting
PAGE_POISONING.

config DEBUG_PAGEALLOC
	bool "Debug page memory allocations"
	depends on DEBUG_KERNEL
	depends on !HIBERNATION || ARCH_SUPPORTS_DEBUG_PAGEALLOC && !PPC && !SPARC
	depends on !KMEMCHECK
	select PAGE_EXTENSION
	select PAGE_POISONING if !ARCH_SUPPORTS_DEBUG_PAGEALLOC

Culprits cc'ed!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds
  2015-01-21  0:07   ` Andrew Morton
@ 2015-01-21 12:57     ` Akinobu Mita
  2015-01-22  1:45       ` Joonsoo Kim
  0 siblings, 1 reply; 18+ messages in thread
From: Akinobu Mita @ 2015-01-21 12:57 UTC (permalink / raw)
  To: Andrew Morton
  Cc: josh, Kim Phillips, Johannes Weiner, Minchan Kim, Joonsoo Kim,
	Rik van Riel, Sasha Levin, Al Viro, Konstantin Khlebnikov,
	Jens Axboe, linux-mm, LKML, linuxppc-dev

2015-01-21 9:07 GMT+09:00 Andrew Morton <akpm@linux-foundation.org>:
> On Tue, 20 Jan 2015 15:01:50 -0800 josh@joshtriplett.org wrote:
>
>> On Tue, Jan 20, 2015 at 02:02:00PM -0600, Kim Phillips wrote:
>> > It's possible to configure DEBUG_PAGEALLOC without PAGE_POISONING on
>> > ppc.  Fix building the generic kernel_map_pages() implementation in
>> > this case:
>> >
>> >   LD      init/built-in.o
>> > mm/built-in.o: In function `free_pages_prepare':
>> > mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
>> > mm/built-in.o: In function `prep_new_page':
>> > mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
>> > mm/built-in.o: In function `map_pages':
>> > mm/compaction.c:61: undefined reference to `.kernel_map_pages'
>> > make: *** [vmlinux] Error 1

kernel_map_pages() is static inline function since commit 031bc5743f15
("mm/debug-pagealloc: make debug-pagealloc boottime configurable").

But there is old declaration in 'arch/powerpc/include/asm/cacheflush.h'.
Removing it or changing s/kernel_map_pages/__kernel_map_pages/ in this
header file or something can fix this problem?

The architecture which has ARCH_SUPPORTS_DEBUG_PAGEALLOC
including PPC should not build mm/debug-pagealloc.o

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds
  2015-01-21 12:57     ` Akinobu Mita
@ 2015-01-22  1:45       ` Joonsoo Kim
  2015-01-22 20:41         ` Kim Phillips
                           ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Joonsoo Kim @ 2015-01-22  1:45 UTC (permalink / raw)
  To: Akinobu Mita
  Cc: Andrew Morton, josh, Kim Phillips, Johannes Weiner, Minchan Kim,
	Rik van Riel, Sasha Levin, Al Viro, Konstantin Khlebnikov,
	Jens Axboe, linux-mm, LKML, linuxppc-dev

On Wed, Jan 21, 2015 at 09:57:59PM +0900, Akinobu Mita wrote:
> 2015-01-21 9:07 GMT+09:00 Andrew Morton <akpm@linux-foundation.org>:
> > On Tue, 20 Jan 2015 15:01:50 -0800 josh@joshtriplett.org wrote:
> >
> >> On Tue, Jan 20, 2015 at 02:02:00PM -0600, Kim Phillips wrote:
> >> > It's possible to configure DEBUG_PAGEALLOC without PAGE_POISONING on
> >> > ppc.  Fix building the generic kernel_map_pages() implementation in
> >> > this case:
> >> >
> >> >   LD      init/built-in.o
> >> > mm/built-in.o: In function `free_pages_prepare':
> >> > mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
> >> > mm/built-in.o: In function `prep_new_page':
> >> > mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
> >> > mm/built-in.o: In function `map_pages':
> >> > mm/compaction.c:61: undefined reference to `.kernel_map_pages'
> >> > make: *** [vmlinux] Error 1
> 
> kernel_map_pages() is static inline function since commit 031bc5743f15
> ("mm/debug-pagealloc: make debug-pagealloc boottime configurable").
> 
> But there is old declaration in 'arch/powerpc/include/asm/cacheflush.h'.
> Removing it or changing s/kernel_map_pages/__kernel_map_pages/ in this
> header file or something can fix this problem?
> 
> The architecture which has ARCH_SUPPORTS_DEBUG_PAGEALLOC
> including PPC should not build mm/debug-pagealloc.o

Yes, architecture with ARCH_SUPPORTS_DEBUG_PAGEALLOC should not build
mm/debug-pagealloc.o. I attach the patch to remove old declaration.
I hope it will fix Kim's problem.

-------------->8------------------
>From 7cb9d1ed8a785df152cb8934e187031c8ebd1bb2 Mon Sep 17 00:00:00 2001
From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Date: Thu, 22 Jan 2015 10:28:58 +0900
Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other
 archs

Kim Phillips reported following build failure.

  LD      init/built-in.o
  mm/built-in.o: In function `free_pages_prepare':
  mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
  mm/built-in.o: In function `prep_new_page':
  mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
  mm/built-in.o: In function `map_pages':
  mm/compaction.c:61: undefined reference to `.kernel_map_pages'
  make: *** [vmlinux] Error 1

Reason for this problem is that commit 031bc5743f15
("mm/debug-pagealloc: make debug-pagealloc boottime configurable") forgot
to remove old declaration of kernel_map_pages() in some architectures.
This patch removes them to fix build failure.

Reported-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
 arch/mn10300/include/asm/cacheflush.h  |    7 -------
 arch/powerpc/include/asm/cacheflush.h  |    7 -------
 arch/s390/include/asm/cacheflush.h     |    4 ----
 arch/sparc/include/asm/cacheflush_64.h |    5 -----
 4 files changed, 23 deletions(-)

diff --git a/arch/mn10300/include/asm/cacheflush.h b/arch/mn10300/include/asm/cacheflush.h
index faed902..6d6df83 100644
--- a/arch/mn10300/include/asm/cacheflush.h
+++ b/arch/mn10300/include/asm/cacheflush.h
@@ -159,13 +159,6 @@ extern void flush_icache_range(unsigned long start, unsigned long end);
 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \
 	memcpy(dst, src, len)
 
-/*
- * Internal debugging function
- */
-#ifdef CONFIG_DEBUG_PAGEALLOC
-extern void kernel_map_pages(struct page *page, int numpages, int enable);
-#endif
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_CACHEFLUSH_H */
diff --git a/arch/powerpc/include/asm/cacheflush.h b/arch/powerpc/include/asm/cacheflush.h
index 5b93122..30b35ff 100644
--- a/arch/powerpc/include/asm/cacheflush.h
+++ b/arch/powerpc/include/asm/cacheflush.h
@@ -60,13 +60,6 @@ extern void flush_dcache_phys_range(unsigned long start, unsigned long stop);
 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \
 	memcpy(dst, src, len)
 
-
-
-#ifdef CONFIG_DEBUG_PAGEALLOC
-/* internal debugging function */
-void kernel_map_pages(struct page *page, int numpages, int enable);
-#endif
-
 #endif /* __KERNEL__ */
 
 #endif /* _ASM_POWERPC_CACHEFLUSH_H */
diff --git a/arch/s390/include/asm/cacheflush.h b/arch/s390/include/asm/cacheflush.h
index 3e20383..58fae7d 100644
--- a/arch/s390/include/asm/cacheflush.h
+++ b/arch/s390/include/asm/cacheflush.h
@@ -4,10 +4,6 @@
 /* Caches aren't brain-dead on the s390. */
 #include <asm-generic/cacheflush.h>
 
-#ifdef CONFIG_DEBUG_PAGEALLOC
-void kernel_map_pages(struct page *page, int numpages, int enable);
-#endif
-
 int set_memory_ro(unsigned long addr, int numpages);
 int set_memory_rw(unsigned long addr, int numpages);
 int set_memory_nx(unsigned long addr, int numpages);
diff --git a/arch/sparc/include/asm/cacheflush_64.h b/arch/sparc/include/asm/cacheflush_64.h
index 3896537..68513c4 100644
--- a/arch/sparc/include/asm/cacheflush_64.h
+++ b/arch/sparc/include/asm/cacheflush_64.h
@@ -74,11 +74,6 @@ void flush_ptrace_access(struct vm_area_struct *, struct page *,
 #define flush_cache_vmap(start, end)		do { } while (0)
 #define flush_cache_vunmap(start, end)		do { } while (0)
 
-#ifdef CONFIG_DEBUG_PAGEALLOC
-/* internal debugging function */
-void kernel_map_pages(struct page *page, int numpages, int enable);
-#endif
-
 #endif /* !__ASSEMBLY__ */
 
 #endif /* _SPARC64_CACHEFLUSH_H */
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds
  2015-01-22  1:45       ` Joonsoo Kim
@ 2015-01-22 20:41         ` Kim Phillips
  2015-01-22 23:49           ` Akinobu Mita
  2015-01-26 19:24         ` [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds Kim Phillips
  2015-01-27  7:56         ` Joonsoo Kim
  2 siblings, 1 reply; 18+ messages in thread
From: Kim Phillips @ 2015-01-22 20:41 UTC (permalink / raw)
  To: Joonsoo Kim
  Cc: Akinobu Mita, Andrew Morton, josh, Johannes Weiner, Minchan Kim,
	Rik van Riel, Sasha Levin, Al Viro, Konstantin Khlebnikov,
	Jens Axboe, linux-mm, LKML, linuxppc-dev

On Thu, 22 Jan 2015 10:45:51 +0900
Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:

> On Wed, Jan 21, 2015 at 09:57:59PM +0900, Akinobu Mita wrote:
> > 2015-01-21 9:07 GMT+09:00 Andrew Morton <akpm@linux-foundation.org>:
> > > On Tue, 20 Jan 2015 15:01:50 -0800 josh@joshtriplett.org wrote:
> > >
> > >> On Tue, Jan 20, 2015 at 02:02:00PM -0600, Kim Phillips wrote:
> > >> > It's possible to configure DEBUG_PAGEALLOC without PAGE_POISONING on
> > >> > ppc.  Fix building the generic kernel_map_pages() implementation in
> > >> > this case:
> > >> >
> > >> >   LD      init/built-in.o
> > >> > mm/built-in.o: In function `free_pages_prepare':
> > >> > mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
> > >> > mm/built-in.o: In function `prep_new_page':
> > >> > mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
> > >> > mm/built-in.o: In function `map_pages':
> > >> > mm/compaction.c:61: undefined reference to `.kernel_map_pages'
> > >> > make: *** [vmlinux] Error 1
> > 
> > kernel_map_pages() is static inline function since commit 031bc5743f15
> > ("mm/debug-pagealloc: make debug-pagealloc boottime configurable").
> > 
> > But there is old declaration in 'arch/powerpc/include/asm/cacheflush.h'.
> > Removing it or changing s/kernel_map_pages/__kernel_map_pages/ in this
> > header file or something can fix this problem?
> > 
> > The architecture which has ARCH_SUPPORTS_DEBUG_PAGEALLOC
> > including PPC should not build mm/debug-pagealloc.o
> 
> Yes, architecture with ARCH_SUPPORTS_DEBUG_PAGEALLOC should not build
> mm/debug-pagealloc.o. I attach the patch to remove old declaration.
> I hope it will fix Kim's problem.
> 
> -------------->8------------------
> From 7cb9d1ed8a785df152cb8934e187031c8ebd1bb2 Mon Sep 17 00:00:00 2001
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> Date: Thu, 22 Jan 2015 10:28:58 +0900
> Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other
>  archs
> 
> Kim Phillips reported following build failure.
> 
>   LD      init/built-in.o
>   mm/built-in.o: In function `free_pages_prepare':
>   mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
>   mm/built-in.o: In function `prep_new_page':
>   mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
>   mm/built-in.o: In function `map_pages':
>   mm/compaction.c:61: undefined reference to `.kernel_map_pages'
>   make: *** [vmlinux] Error 1
> 
> Reason for this problem is that commit 031bc5743f15
> ("mm/debug-pagealloc: make debug-pagealloc boottime configurable") forgot
> to remove old declaration of kernel_map_pages() in some architectures.
> This patch removes them to fix build failure.
> 
> Reported-by: Kim Phillips <kim.phillips@freescale.com>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> ---

Thanks. Now I get this:

  LD      init/built-in.o
mm/built-in.o: In function `kernel_map_pages':
include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
Makefile:925: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1

but, AFAICT, that's not because this patch is invalid: it's because
__kernel_map_pages() isn't implemented in
arch/powerpc/mm/pgtable_64.c, i.e., for non-PPC_STD_MMU_64 PPC64
machines.

Kim

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds
  2015-01-22 20:41         ` Kim Phillips
@ 2015-01-22 23:49           ` Akinobu Mita
  2015-01-23  3:20             ` Kim Phillips
  0 siblings, 1 reply; 18+ messages in thread
From: Akinobu Mita @ 2015-01-22 23:49 UTC (permalink / raw)
  To: Kim Phillips
  Cc: Joonsoo Kim, Andrew Morton, josh, Johannes Weiner, Minchan Kim,
	Rik van Riel, Sasha Levin, Al Viro, Konstantin Khlebnikov,
	Jens Axboe, linux-mm, LKML, linuxppc-dev

2015-01-23 5:41 GMT+09:00 Kim Phillips <kim.phillips@freescale.com>:
> On Thu, 22 Jan 2015 10:45:51 +0900
> Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:
>
>> On Wed, Jan 21, 2015 at 09:57:59PM +0900, Akinobu Mita wrote:
>> > 2015-01-21 9:07 GMT+09:00 Andrew Morton <akpm@linux-foundation.org>:
>> > > On Tue, 20 Jan 2015 15:01:50 -0800 josh@joshtriplett.org wrote:
>> > >
>> > >> On Tue, Jan 20, 2015 at 02:02:00PM -0600, Kim Phillips wrote:
>> > >> > It's possible to configure DEBUG_PAGEALLOC without PAGE_POISONING on
>> > >> > ppc.  Fix building the generic kernel_map_pages() implementation in
>> > >> > this case:
>> > >> >
>> > >> >   LD      init/built-in.o
>> > >> > mm/built-in.o: In function `free_pages_prepare':
>> > >> > mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
>> > >> > mm/built-in.o: In function `prep_new_page':
>> > >> > mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
>> > >> > mm/built-in.o: In function `map_pages':
>> > >> > mm/compaction.c:61: undefined reference to `.kernel_map_pages'
>> > >> > make: *** [vmlinux] Error 1
>> >
>> > kernel_map_pages() is static inline function since commit 031bc5743f15
>> > ("mm/debug-pagealloc: make debug-pagealloc boottime configurable").
>> >
>> > But there is old declaration in 'arch/powerpc/include/asm/cacheflush.h'.
>> > Removing it or changing s/kernel_map_pages/__kernel_map_pages/ in this
>> > header file or something can fix this problem?
>> >
>> > The architecture which has ARCH_SUPPORTS_DEBUG_PAGEALLOC
>> > including PPC should not build mm/debug-pagealloc.o
>>
>> Yes, architecture with ARCH_SUPPORTS_DEBUG_PAGEALLOC should not build
>> mm/debug-pagealloc.o. I attach the patch to remove old declaration.
>> I hope it will fix Kim's problem.
>>
>> -------------->8------------------
>> From 7cb9d1ed8a785df152cb8934e187031c8ebd1bb2 Mon Sep 17 00:00:00 2001
>> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>> Date: Thu, 22 Jan 2015 10:28:58 +0900
>> Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other
>>  archs
>>
>> Kim Phillips reported following build failure.
>>
>>   LD      init/built-in.o
>>   mm/built-in.o: In function `free_pages_prepare':
>>   mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
>>   mm/built-in.o: In function `prep_new_page':
>>   mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
>>   mm/built-in.o: In function `map_pages':
>>   mm/compaction.c:61: undefined reference to `.kernel_map_pages'
>>   make: *** [vmlinux] Error 1
>>
>> Reason for this problem is that commit 031bc5743f15
>> ("mm/debug-pagealloc: make debug-pagealloc boottime configurable") forgot
>> to remove old declaration of kernel_map_pages() in some architectures.
>> This patch removes them to fix build failure.
>>
>> Reported-by: Kim Phillips <kim.phillips@freescale.com>
>> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>> ---
>
> Thanks. Now I get this:
>
>   LD      init/built-in.o
> mm/built-in.o: In function `kernel_map_pages':
> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> Makefile:925: recipe for target 'vmlinux' failed
> make: *** [vmlinux] Error 1
>
> but, AFAICT, that's not because this patch is invalid: it's because
> __kernel_map_pages() isn't implemented in
> arch/powerpc/mm/pgtable_64.c, i.e., for non-PPC_STD_MMU_64 PPC64
> machines.

Then, in order to use generic __kernel_map_pages() in mm/debug-pagealloc.c,
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC shouldn't be selected in
arch/powerpc/Kconfig, when CONFIG_PPC_STD_MMU_64 isn't defined.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds
  2015-01-22 23:49           ` Akinobu Mita
@ 2015-01-23  3:20             ` Kim Phillips
  2015-01-23  4:24               ` Michael Ellerman
  0 siblings, 1 reply; 18+ messages in thread
From: Kim Phillips @ 2015-01-23  3:20 UTC (permalink / raw)
  To: Akinobu Mita
  Cc: Joonsoo Kim, Andrew Morton, josh, Johannes Weiner, Minchan Kim,
	Rik van Riel, Sasha Levin, Al Viro, Konstantin Khlebnikov,
	Jens Axboe, linux-mm, LKML, linuxppc-dev

On Fri, 23 Jan 2015 08:49:36 +0900
Akinobu Mita <akinobu.mita@gmail.com> wrote:

> 2015-01-23 5:41 GMT+09:00 Kim Phillips <kim.phillips@freescale.com>:
> > Thanks. Now I get this:
> >
> >   LD      init/built-in.o
> > mm/built-in.o: In function `kernel_map_pages':
> > include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> > include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> > include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> > Makefile:925: recipe for target 'vmlinux' failed
> > make: *** [vmlinux] Error 1
> >
> > but, AFAICT, that's not because this patch is invalid: it's because
> > __kernel_map_pages() isn't implemented in
> > arch/powerpc/mm/pgtable_64.c, i.e., for non-PPC_STD_MMU_64 PPC64
> > machines.
> 
> Then, in order to use generic __kernel_map_pages() in mm/debug-pagealloc.c,
> CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC shouldn't be selected in
> arch/powerpc/Kconfig, when CONFIG_PPC_STD_MMU_64 isn't defined.

Thanks.  I'm still build-testing this now:

>From 082911ee947246ff962ef21863c45ec467455c40 Mon Sep 17 00:00:00 2001
From: Kim Phillips <kim.phillips@freescale.com>
Date: Thu, 22 Jan 2015 20:42:40 -0600
Subject: [PATCH v2] mm: fix undefined reference to  `.__kernel_map_pages' on FSL
 PPC64

arch/powerpc has __kernel_map_pages implementations in mm/pgtable_32.c, and
mm/hash_utils_64.c, of which the former is built for PPC32, and the latter
PPC64's without PPC_STD_MMU.  Fix arch/powerpc/Kconfig to not select
ARCH_SUPPORTS_DEBUG_PAGEALLOC when CONFIG_PPC_STD_MMU_64 isn't defined,
i.e., for 64-bit book3e builds to use the generic __kernel_map_pages()
in mm/debug-pagealloc.c.

  LD      init/built-in.o
mm/built-in.o: In function `kernel_map_pages':
include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
Makefile:925: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
v2: corrected SUPPORTS_DEBUG_PAGEALLOC selection to enable
non-STD_MMU_64 builds to use the generic __kernel_map_pages().

note: depends on Joonsoo Kim's patch "mm/debug_pagealloc: fix build
failure on ppc and some other archs" published earlier in this
thread.

 arch/powerpc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a2a168e..22b0940 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -256,6 +256,7 @@ config PPC_OF_PLATFORM_PCI
 	default n
 
 config ARCH_SUPPORTS_DEBUG_PAGEALLOC
+	depends on PPC32 || PPC_STD_MMU_64
 	def_bool y
 
 config ARCH_SUPPORTS_UPROBES
-- 
2.2.2

Thanks,

Kim

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds
  2015-01-23  3:20             ` Kim Phillips
@ 2015-01-23  4:24               ` Michael Ellerman
  2015-01-26 19:22                 ` [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64 Kim Phillips
  0 siblings, 1 reply; 18+ messages in thread
From: Michael Ellerman @ 2015-01-23  4:24 UTC (permalink / raw)
  To: Kim Phillips
  Cc: Akinobu Mita, Konstantin Khlebnikov, Rik van Riel, linux-mm,
	josh, LKML, Jens Axboe, Minchan Kim, Al Viro, Johannes Weiner,
	Sasha Levin, Joonsoo Kim, linuxppc-dev, Andrew Morton

On Thu, 2015-01-22 at 21:20 -0600, Kim Phillips wrote:
> On Fri, 23 Jan 2015 08:49:36 +0900
> Akinobu Mita <akinobu.mita@gmail.com> wrote:
> 
> > 2015-01-23 5:41 GMT+09:00 Kim Phillips <kim.phillips@freescale.com>:
> > > Thanks. Now I get this:
> > >
> > >   LD      init/built-in.o
> > > mm/built-in.o: In function `kernel_map_pages':
> > > include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> > > include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> > > include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> > > Makefile:925: recipe for target 'vmlinux' failed
> > > make: *** [vmlinux] Error 1
> > >
> > > but, AFAICT, that's not because this patch is invalid: it's because
> > > __kernel_map_pages() isn't implemented in
> > > arch/powerpc/mm/pgtable_64.c, i.e., for non-PPC_STD_MMU_64 PPC64
> > > machines.
> > 
> > Then, in order to use generic __kernel_map_pages() in mm/debug-pagealloc.c,
> > CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC shouldn't be selected in
> > arch/powerpc/Kconfig, when CONFIG_PPC_STD_MMU_64 isn't defined.
> 
> Thanks.  I'm still build-testing this now:
> 
> From 082911ee947246ff962ef21863c45ec467455c40 Mon Sep 17 00:00:00 2001
> From: Kim Phillips <kim.phillips@freescale.com>
> Date: Thu, 22 Jan 2015 20:42:40 -0600
> Subject: [PATCH v2] mm: fix undefined reference to  `.__kernel_map_pages' on FSL
>  PPC64
> 
> arch/powerpc has __kernel_map_pages implementations in mm/pgtable_32.c, and
> mm/hash_utils_64.c, of which the former is built for PPC32, and the latter
> PPC64's without PPC_STD_MMU.

That last part is wrong.

hash_utils_64.c is built for CONFIG_PPC_STD_MMU_64, which is:

config PPC_STD_MMU_64
	def_bool y
	depends on PPC_STD_MMU && PPC64

The problem is when you have PPC64 && !PPC_STD_MMU.

cheers





^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3] powerpc/mm: fix undefined reference to  `.__kernel_map_pages' on FSL PPC64
  2015-01-23  4:24               ` Michael Ellerman
@ 2015-01-26 19:22                 ` Kim Phillips
  2015-01-28  1:01                   ` Michael Ellerman
  0 siblings, 1 reply; 18+ messages in thread
From: Kim Phillips @ 2015-01-26 19:22 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Akinobu Mita, Konstantin Khlebnikov, Rik van Riel, linux-mm,
	josh, LKML, Jens Axboe, Minchan Kim, Al Viro, Johannes Weiner,
	Sasha Levin, Joonsoo Kim, linuxppc-dev, Andrew Morton,
	Benjamin Herrenschmidt, Paul Mackerras, Scott Wood

arch/powerpc has __kernel_map_pages implementations in mm/pgtable_32.c, and
mm/hash_utils_64.c, of which the former is built for PPC32, and the latter
for PPC64 machines with PPC_STD_MMU.  Fix arch/powerpc/Kconfig to not select
ARCH_SUPPORTS_DEBUG_PAGEALLOC when CONFIG_PPC_STD_MMU_64 isn't defined,
i.e., for 64-bit book3e builds to use the generic __kernel_map_pages()
in mm/debug-pagealloc.c.

  LD      init/built-in.o
mm/built-in.o: In function `kernel_map_pages':
include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
Makefile:925: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
v3:
- fix wording for hash_utils_64.c implementation pointed out by
Michael Ellerman
- changed designation from 'mm:' to 'powerpc/mm:', as I think this
now belongs in ppc-land

v2:
- corrected SUPPORTS_DEBUG_PAGEALLOC selection to enable
non-STD_MMU_64 builds to use the generic __kernel_map_pages().

depends on:
From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Date: Thu, 22 Jan 2015 10:28:58 +0900
Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other archs

 arch/powerpc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a2a168e..22b0940 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -256,6 +256,7 @@ config PPC_OF_PLATFORM_PCI
 	default n
 
 config ARCH_SUPPORTS_DEBUG_PAGEALLOC
+	depends on PPC32 || PPC_STD_MMU_64
 	def_bool y
 
 config ARCH_SUPPORTS_UPROBES
-- 
2.2.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds
  2015-01-22  1:45       ` Joonsoo Kim
  2015-01-22 20:41         ` Kim Phillips
@ 2015-01-26 19:24         ` Kim Phillips
  2015-01-27  7:56         ` Joonsoo Kim
  2 siblings, 0 replies; 18+ messages in thread
From: Kim Phillips @ 2015-01-26 19:24 UTC (permalink / raw)
  To: Joonsoo Kim
  Cc: Akinobu Mita, Andrew Morton, josh, Johannes Weiner, Minchan Kim,
	Rik van Riel, Sasha Levin, Al Viro, Konstantin Khlebnikov,
	Jens Axboe, linux-mm, LKML, linuxppc-dev, Benjamin Herrenschmidt,
	Paul Mackerras, Scott Wood

On Thu, 22 Jan 2015 10:45:51 +0900
Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:

> From 7cb9d1ed8a785df152cb8934e187031c8ebd1bb2 Mon Sep 17 00:00:00 2001
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> Date: Thu, 22 Jan 2015 10:28:58 +0900
> Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other
>  archs
> 
> Kim Phillips reported following build failure.
> 
>   LD      init/built-in.o
>   mm/built-in.o: In function `free_pages_prepare':
>   mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
>   mm/built-in.o: In function `prep_new_page':
>   mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
>   mm/built-in.o: In function `map_pages':
>   mm/compaction.c:61: undefined reference to `.kernel_map_pages'
>   make: *** [vmlinux] Error 1
> 
> Reason for this problem is that commit 031bc5743f15
> ("mm/debug-pagealloc: make debug-pagealloc boottime configurable") forgot
> to remove old declaration of kernel_map_pages() in some architectures.
> This patch removes them to fix build failure.
> 
> Reported-by: Kim Phillips <kim.phillips@freescale.com>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> ---

Acked-by: Kim Phillips <kim.phillips@freescale.com>

Thanks,

Kim

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds
  2015-01-22  1:45       ` Joonsoo Kim
  2015-01-22 20:41         ` Kim Phillips
  2015-01-26 19:24         ` [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds Kim Phillips
@ 2015-01-27  7:56         ` Joonsoo Kim
  2 siblings, 0 replies; 18+ messages in thread
From: Joonsoo Kim @ 2015-01-27  7:56 UTC (permalink / raw)
  To: Akinobu Mita
  Cc: Andrew Morton, josh, Kim Phillips, Johannes Weiner, Minchan Kim,
	Rik van Riel, Sasha Levin, Al Viro, Konstantin Khlebnikov,
	Jens Axboe, linux-mm, LKML, linuxppc-dev

On Thu, Jan 22, 2015 at 10:45:51AM +0900, Joonsoo Kim wrote:
> On Wed, Jan 21, 2015 at 09:57:59PM +0900, Akinobu Mita wrote:
> > 2015-01-21 9:07 GMT+09:00 Andrew Morton <akpm@linux-foundation.org>:
> > > On Tue, 20 Jan 2015 15:01:50 -0800 josh@joshtriplett.org wrote:
> > >
> > >> On Tue, Jan 20, 2015 at 02:02:00PM -0600, Kim Phillips wrote:
> > >> > It's possible to configure DEBUG_PAGEALLOC without PAGE_POISONING on
> > >> > ppc.  Fix building the generic kernel_map_pages() implementation in
> > >> > this case:
> > >> >
> > >> >   LD      init/built-in.o
> > >> > mm/built-in.o: In function `free_pages_prepare':
> > >> > mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
> > >> > mm/built-in.o: In function `prep_new_page':
> > >> > mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
> > >> > mm/built-in.o: In function `map_pages':
> > >> > mm/compaction.c:61: undefined reference to `.kernel_map_pages'
> > >> > make: *** [vmlinux] Error 1
> > 
> > kernel_map_pages() is static inline function since commit 031bc5743f15
> > ("mm/debug-pagealloc: make debug-pagealloc boottime configurable").
> > 
> > But there is old declaration in 'arch/powerpc/include/asm/cacheflush.h'.
> > Removing it or changing s/kernel_map_pages/__kernel_map_pages/ in this
> > header file or something can fix this problem?
> > 
> > The architecture which has ARCH_SUPPORTS_DEBUG_PAGEALLOC
> > including PPC should not build mm/debug-pagealloc.o
> 
> Yes, architecture with ARCH_SUPPORTS_DEBUG_PAGEALLOC should not build
> mm/debug-pagealloc.o. I attach the patch to remove old declaration.
> I hope it will fix Kim's problem.
> 
> -------------->8------------------
> >From 7cb9d1ed8a785df152cb8934e187031c8ebd1bb2 Mon Sep 17 00:00:00 2001
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> Date: Thu, 22 Jan 2015 10:28:58 +0900
> Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other
>  archs
> 
> Kim Phillips reported following build failure.
> 
>   LD      init/built-in.o
>   mm/built-in.o: In function `free_pages_prepare':
>   mm/page_alloc.c:770: undefined reference to `.kernel_map_pages'
>   mm/built-in.o: In function `prep_new_page':
>   mm/page_alloc.c:933: undefined reference to `.kernel_map_pages'
>   mm/built-in.o: In function `map_pages':
>   mm/compaction.c:61: undefined reference to `.kernel_map_pages'
>   make: *** [vmlinux] Error 1
> 
> Reason for this problem is that commit 031bc5743f15
> ("mm/debug-pagealloc: make debug-pagealloc boottime configurable") forgot
> to remove old declaration of kernel_map_pages() in some architectures.
> This patch removes them to fix build failure.
> 
> Reported-by: Kim Phillips <kim.phillips@freescale.com>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Hello, Andrew.

Could you take this patch?
This patch is also needed to fix build failure.

Thanks.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] powerpc/mm: fix undefined reference to  `.__kernel_map_pages' on FSL PPC64
  2015-01-26 19:22                 ` [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64 Kim Phillips
@ 2015-01-28  1:01                   ` Michael Ellerman
  2015-01-28  1:33                     ` Joonsoo Kim
  0 siblings, 1 reply; 18+ messages in thread
From: Michael Ellerman @ 2015-01-28  1:01 UTC (permalink / raw)
  To: Kim Phillips
  Cc: Akinobu Mita, Konstantin Khlebnikov, Rik van Riel, linux-mm,
	josh, LKML, Jens Axboe, Minchan Kim, Al Viro, Johannes Weiner,
	Sasha Levin, Joonsoo Kim, linuxppc-dev, Andrew Morton,
	Benjamin Herrenschmidt, Paul Mackerras, Scott Wood

On Mon, 2015-01-26 at 13:22 -0600, Kim Phillips wrote:
> arch/powerpc has __kernel_map_pages implementations in mm/pgtable_32.c, and
> mm/hash_utils_64.c, of which the former is built for PPC32, and the latter
> for PPC64 machines with PPC_STD_MMU.  Fix arch/powerpc/Kconfig to not select
> ARCH_SUPPORTS_DEBUG_PAGEALLOC when CONFIG_PPC_STD_MMU_64 isn't defined,
> i.e., for 64-bit book3e builds to use the generic __kernel_map_pages()
> in mm/debug-pagealloc.c.
> 
>   LD      init/built-in.o
> mm/built-in.o: In function `kernel_map_pages':
> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> Makefile:925: recipe for target 'vmlinux' failed
> make: *** [vmlinux] Error 1
> 
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> ---
> v3:
> - fix wording for hash_utils_64.c implementation pointed out by
> Michael Ellerman
> - changed designation from 'mm:' to 'powerpc/mm:', as I think this
> now belongs in ppc-land
> 
> v2:
> - corrected SUPPORTS_DEBUG_PAGEALLOC selection to enable
> non-STD_MMU_64 builds to use the generic __kernel_map_pages().

I'd be happy to take this through the powerpc tree for 3.20, but for this:

> depends on:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> Date: Thu, 22 Jan 2015 10:28:58 +0900
> Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other archs

I don't have that patch in my tree.

But in what way does this patch depend on that one?

It looks to me like it'd be safe to take this on its own, or am I wrong?

cheers



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64
  2015-01-28  1:01                   ` Michael Ellerman
@ 2015-01-28  1:33                     ` Joonsoo Kim
  2015-01-28  2:57                       ` Andrew Morton
  0 siblings, 1 reply; 18+ messages in thread
From: Joonsoo Kim @ 2015-01-28  1:33 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Kim Phillips, Akinobu Mita, Konstantin Khlebnikov, Rik van Riel,
	Linux Memory Management List, josh, LKML, Jens Axboe,
	Minchan Kim, Al Viro, Johannes Weiner, Sasha Levin, Joonsoo Kim,
	linuxppc-dev, Andrew Morton, Benjamin Herrenschmidt,
	Paul Mackerras, Scott Wood

2015-01-28 10:01 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
> On Mon, 2015-01-26 at 13:22 -0600, Kim Phillips wrote:
>> arch/powerpc has __kernel_map_pages implementations in mm/pgtable_32.c, and
>> mm/hash_utils_64.c, of which the former is built for PPC32, and the latter
>> for PPC64 machines with PPC_STD_MMU.  Fix arch/powerpc/Kconfig to not select
>> ARCH_SUPPORTS_DEBUG_PAGEALLOC when CONFIG_PPC_STD_MMU_64 isn't defined,
>> i.e., for 64-bit book3e builds to use the generic __kernel_map_pages()
>> in mm/debug-pagealloc.c.
>>
>>   LD      init/built-in.o
>> mm/built-in.o: In function `kernel_map_pages':
>> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
>> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
>> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
>> Makefile:925: recipe for target 'vmlinux' failed
>> make: *** [vmlinux] Error 1
>>
>> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
>> ---
>> v3:
>> - fix wording for hash_utils_64.c implementation pointed out by
>> Michael Ellerman
>> - changed designation from 'mm:' to 'powerpc/mm:', as I think this
>> now belongs in ppc-land
>>
>> v2:
>> - corrected SUPPORTS_DEBUG_PAGEALLOC selection to enable
>> non-STD_MMU_64 builds to use the generic __kernel_map_pages().
>
> I'd be happy to take this through the powerpc tree for 3.20, but for this:
>
>> depends on:
>> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>> Date: Thu, 22 Jan 2015 10:28:58 +0900
>> Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other archs
>
> I don't have that patch in my tree.
>
> But in what way does this patch depend on that one?
>
> It looks to me like it'd be safe to take this on its own, or am I wrong?
>

Hello,

These two patches are merged to Andrew's tree now.

Thanks.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64
  2015-01-28  1:33                     ` Joonsoo Kim
@ 2015-01-28  2:57                       ` Andrew Morton
  2015-01-28  3:22                         ` Michael Ellerman
  0 siblings, 1 reply; 18+ messages in thread
From: Andrew Morton @ 2015-01-28  2:57 UTC (permalink / raw)
  To: Joonsoo Kim
  Cc: Michael Ellerman, Kim Phillips, Akinobu Mita,
	Konstantin Khlebnikov, Rik van Riel,
	Linux Memory Management List, josh, LKML, Jens Axboe,
	Minchan Kim, Al Viro, Johannes Weiner, Sasha Levin, Joonsoo Kim,
	linuxppc-dev, Benjamin Herrenschmidt, Paul Mackerras, Scott Wood

On Wed, 28 Jan 2015 10:33:59 +0900 Joonsoo Kim <js1304@gmail.com> wrote:

> 2015-01-28 10:01 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
> > On Mon, 2015-01-26 at 13:22 -0600, Kim Phillips wrote:
> >> arch/powerpc has __kernel_map_pages implementations in mm/pgtable_32.c, and
> >> mm/hash_utils_64.c, of which the former is built for PPC32, and the latter
> >> for PPC64 machines with PPC_STD_MMU.  Fix arch/powerpc/Kconfig to not select
> >> ARCH_SUPPORTS_DEBUG_PAGEALLOC when CONFIG_PPC_STD_MMU_64 isn't defined,
> >> i.e., for 64-bit book3e builds to use the generic __kernel_map_pages()
> >> in mm/debug-pagealloc.c.
> >>
> >>   LD      init/built-in.o
> >> mm/built-in.o: In function `kernel_map_pages':
> >> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> >> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> >> include/linux/mm.h:2076: undefined reference to `.__kernel_map_pages'
> >> Makefile:925: recipe for target 'vmlinux' failed
> >> make: *** [vmlinux] Error 1
> >>
> >> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> >> ---
> >> v3:
> >> - fix wording for hash_utils_64.c implementation pointed out by
> >> Michael Ellerman
> >> - changed designation from 'mm:' to 'powerpc/mm:', as I think this
> >> now belongs in ppc-land
> >>
> >> v2:
> >> - corrected SUPPORTS_DEBUG_PAGEALLOC selection to enable
> >> non-STD_MMU_64 builds to use the generic __kernel_map_pages().
> >
> > I'd be happy to take this through the powerpc tree for 3.20, but for this:
> >
> >> depends on:
> >> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> >> Date: Thu, 22 Jan 2015 10:28:58 +0900
> >> Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other archs
> >
> > I don't have that patch in my tree.
> >
> > But in what way does this patch depend on that one?
> >
> > It looks to me like it'd be safe to take this on its own, or am I wrong?
> >
> 
> Hello,
> 
> These two patches are merged to Andrew's tree now.

That didn't answer either of Michael's questions ;)

Yes, I think they're independent.  I was holding off on the powerpc
one, waiting to see if it popped up in linux-next via your tree.  I can
merge both if you like?



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64
  2015-01-28  2:57                       ` Andrew Morton
@ 2015-01-28  3:22                         ` Michael Ellerman
  2015-01-28 20:14                           ` Kim Phillips
  0 siblings, 1 reply; 18+ messages in thread
From: Michael Ellerman @ 2015-01-28  3:22 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Joonsoo Kim, Kim Phillips, Akinobu Mita, Konstantin Khlebnikov,
	Rik van Riel, Linux Memory Management List, josh, LKML,
	Jens Axboe, Minchan Kim, Al Viro, Johannes Weiner, Sasha Levin,
	Joonsoo Kim, linuxppc-dev, Benjamin Herrenschmidt,
	Paul Mackerras, Scott Wood

On Tue, 2015-01-27 at 18:57 -0800, Andrew Morton wrote:
> On Wed, 28 Jan 2015 10:33:59 +0900 Joonsoo Kim <js1304@gmail.com> wrote:
> 
> > 2015-01-28 10:01 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
> > > On Mon, 2015-01-26 at 13:22 -0600, Kim Phillips wrote:
> > >> arch/powerpc has __kernel_map_pages implementations in mm/pgtable_32.c, and
> > >
> > > I'd be happy to take this through the powerpc tree for 3.20, but for this:
> > >
> > >> depends on:
> > >> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> > >> Date: Thu, 22 Jan 2015 10:28:58 +0900
> > >> Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other archs
> > >
> > > I don't have that patch in my tree.
> > >
> > > But in what way does this patch depend on that one?
> > >
> > > It looks to me like it'd be safe to take this on its own, or am I wrong?
> > 
> > Hello,
> > 
> > These two patches are merged to Andrew's tree now.
> 
> That didn't answer either of Michael's questions ;)
> 
> Yes, I think they're independent.  I was holding off on the powerpc
> one, waiting to see if it popped up in linux-next via your tree.  I can
> merge both if you like?

Right, I didn't think I'd seen it in your tree :)

I'm happy to take this one, saves a possible merge conflict.

cheers




^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64
  2015-01-28  3:22                         ` Michael Ellerman
@ 2015-01-28 20:14                           ` Kim Phillips
  2015-01-29  4:05                             ` Michael Ellerman
  0 siblings, 1 reply; 18+ messages in thread
From: Kim Phillips @ 2015-01-28 20:14 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Andrew Morton, Joonsoo Kim, Akinobu Mita, Konstantin Khlebnikov,
	Rik van Riel, Linux Memory Management List, josh, LKML,
	Jens Axboe, Minchan Kim, Al Viro, Johannes Weiner, Sasha Levin,
	Joonsoo Kim, linuxppc-dev, Benjamin Herrenschmidt,
	Paul Mackerras, Scott Wood

On Wed, 28 Jan 2015 14:22:02 +1100
Michael Ellerman <mpe@ellerman.id.au> wrote:

> On Tue, 2015-01-27 at 18:57 -0800, Andrew Morton wrote:
> > On Wed, 28 Jan 2015 10:33:59 +0900 Joonsoo Kim <js1304@gmail.com> wrote:
> > 
> > > 2015-01-28 10:01 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
> > > > On Mon, 2015-01-26 at 13:22 -0600, Kim Phillips wrote:
> > > >> arch/powerpc has __kernel_map_pages implementations in mm/pgtable_32.c, and
> > > >
> > > > I'd be happy to take this through the powerpc tree for 3.20, but for this:
> > > >
> > > >> depends on:
> > > >> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> > > >> Date: Thu, 22 Jan 2015 10:28:58 +0900
> > > >> Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other archs
> > > >
> > > > I don't have that patch in my tree.
> > > >
> > > > But in what way does this patch depend on that one?
> > > >
> > > > It looks to me like it'd be safe to take this on its own, or am I wrong?
> > > 
> > > Hello,
> > > 
> > > These two patches are merged to Andrew's tree now.
> > 
> > That didn't answer either of Michael's questions ;)
> > 
> > Yes, I think they're independent.  I was holding off on the powerpc

sorry - my bad, they are indeed completely independent.

> > one, waiting to see if it popped up in linux-next via your tree.  I can
> > merge both if you like?
> 
> Right, I didn't think I'd seen it in your tree :)
> 
> I'm happy to take this one, saves a possible merge conflict.

I'm fine either way (I work on linux-next).

Kim

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64
  2015-01-28 20:14                           ` Kim Phillips
@ 2015-01-29  4:05                             ` Michael Ellerman
  0 siblings, 0 replies; 18+ messages in thread
From: Michael Ellerman @ 2015-01-29  4:05 UTC (permalink / raw)
  To: Kim Phillips
  Cc: Andrew Morton, Joonsoo Kim, Akinobu Mita, Konstantin Khlebnikov,
	Rik van Riel, Linux Memory Management List, josh, LKML,
	Jens Axboe, Minchan Kim, Al Viro, Johannes Weiner, Sasha Levin,
	Joonsoo Kim, linuxppc-dev, Benjamin Herrenschmidt,
	Paul Mackerras, Scott Wood

On Wed, 2015-01-28 at 14:14 -0600, Kim Phillips wrote:
> On Wed, 28 Jan 2015 14:22:02 +1100
> Michael Ellerman <mpe@ellerman.id.au> wrote:
> 
> > On Tue, 2015-01-27 at 18:57 -0800, Andrew Morton wrote:
> > > On Wed, 28 Jan 2015 10:33:59 +0900 Joonsoo Kim <js1304@gmail.com> wrote:
> > > 
> > > > 2015-01-28 10:01 GMT+09:00 Michael Ellerman <mpe@ellerman.id.au>:
> > > > > On Mon, 2015-01-26 at 13:22 -0600, Kim Phillips wrote:
> > > > >> arch/powerpc has __kernel_map_pages implementations in mm/pgtable_32.c, and
> > > > >
> > > > > I'd be happy to take this through the powerpc tree for 3.20, but for this:
> > > > >
> > > > >> depends on:
> > > > >> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> > > > >> Date: Thu, 22 Jan 2015 10:28:58 +0900
> > > > >> Subject: [PATCH] mm/debug_pagealloc: fix build failure on ppc and some other archs
> > > > >
> > > > > I don't have that patch in my tree.
> > > > >
> > > > > But in what way does this patch depend on that one?
> > > > >
> > > > > It looks to me like it'd be safe to take this on its own, or am I wrong?
> > > > 
> > > > Hello,
> > > > 
> > > > These two patches are merged to Andrew's tree now.
> > > 
> > > That didn't answer either of Michael's questions ;)
> > > 
> > > Yes, I think they're independent.  I was holding off on the powerpc
> 
> sorry - my bad, they are indeed completely independent.
 
No worries.

> > > one, waiting to see if it popped up in linux-next via your tree.  I can
> > > merge both if you like?
> > 
> > Right, I didn't think I'd seen it in your tree :)
> > 
> > I'm happy to take this one, saves a possible merge conflict.
> 
> I'm fine either way (I work on linux-next).

Cool. It's in my next as of now, so should be in linux-next tomorrow (30th).

cheers



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-01-29  4:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-20 20:02 [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds Kim Phillips
2015-01-20 23:01 ` josh
2015-01-21  0:07   ` Andrew Morton
2015-01-21 12:57     ` Akinobu Mita
2015-01-22  1:45       ` Joonsoo Kim
2015-01-22 20:41         ` Kim Phillips
2015-01-22 23:49           ` Akinobu Mita
2015-01-23  3:20             ` Kim Phillips
2015-01-23  4:24               ` Michael Ellerman
2015-01-26 19:22                 ` [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64 Kim Phillips
2015-01-28  1:01                   ` Michael Ellerman
2015-01-28  1:33                     ` Joonsoo Kim
2015-01-28  2:57                       ` Andrew Morton
2015-01-28  3:22                         ` Michael Ellerman
2015-01-28 20:14                           ` Kim Phillips
2015-01-29  4:05                             ` Michael Ellerman
2015-01-26 19:24         ` [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds Kim Phillips
2015-01-27  7:56         ` Joonsoo Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).