linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kim Phillips <kim.phillips@freescale.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
	Konstantin Khlebnikov <k.khlebnikov@samsung.com>,
	Rik van Riel <riel@redhat.com>, <linux-mm@kvack.org>,
	<josh@joshtriplett.org>, LKML <linux-kernel@vger.kernel.org>,
	Jens Axboe <axboe@fb.com>, Minchan Kim <minchan@kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Sasha Levin <sasha.levin@oracle.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Scott Wood <scottwood@freescale.com>
Subject: [PATCH v3] powerpc/mm: fix undefined reference to  `.__kernel_map_pages' on FSL PPC64
Date: Mon, 26 Jan 2015 13:22:22 -0600	[thread overview]
Message-ID: <20150126132222.6477257be204a3332601ef11@freescale.com> (raw)
In-Reply-To: <1421987091.24984.13.camel@ellerman.id.au>

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


  reply	other threads:[~2015-01-26 19:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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                 ` Kim Phillips [this message]
2015-01-28  1:01                   ` [PATCH v3] powerpc/mm: fix undefined reference to `.__kernel_map_pages' on FSL PPC64 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150126132222.6477257be204a3332601ef11@freescale.com \
    --to=kim.phillips@freescale.com \
    --cc=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@fb.com \
    --cc=benh@kernel.crashing.org \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=josh@joshtriplett.org \
    --cc=k.khlebnikov@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=minchan@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=riel@redhat.com \
    --cc=sasha.levin@oracle.com \
    --cc=scottwood@freescale.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).