diff mbox

[v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64

Message ID 20150126132222.6477257be204a3332601ef11@freescale.com (mailing list archive)
State Accepted
Delegated to: Michael Ellerman
Headers show

Commit Message

Kim Phillips Jan. 26, 2015, 7:22 p.m. UTC
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(+)

Comments

Michael Ellerman Jan. 28, 2015, 1:01 a.m. UTC | #1
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
Joonsoo Kim Jan. 28, 2015, 1:33 a.m. UTC | #2
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.
Andrew Morton Jan. 28, 2015, 2:57 a.m. UTC | #3
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?
Michael Ellerman Jan. 28, 2015, 3:22 a.m. UTC | #4
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
Kim Phillips Jan. 28, 2015, 8:14 p.m. UTC | #5
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
Michael Ellerman Jan. 29, 2015, 4:05 a.m. UTC | #6
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
diff mbox

Patch

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