From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754164AbbAWEY4 (ORCPT ); Thu, 22 Jan 2015 23:24:56 -0500 Received: from ozlabs.org ([103.22.144.67]:33495 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752950AbbAWEYy (ORCPT ); Thu, 22 Jan 2015 23:24:54 -0500 Message-ID: <1421987091.24984.13.camel@ellerman.id.au> Subject: Re: [PATCH 2/2] mm: fix undefined reference to `.kernel_map_pages' on PPC builds From: Michael Ellerman To: Kim Phillips Cc: Akinobu Mita , Konstantin Khlebnikov , Rik van Riel , linux-mm@kvack.org, josh@joshtriplett.org, LKML , Jens Axboe , Minchan Kim , Al Viro , Johannes Weiner , Sasha Levin , Joonsoo Kim , linuxppc-dev , Andrew Morton Date: Fri, 23 Jan 2015 15:24:51 +1100 In-Reply-To: <20150122212017.4b7032d52a6c75c06d5b4728@freescale.com> References: <20150120140200.aa7ba0eb28d95e456972e178@freescale.com> <20150120230150.GA14475@cloud> <20150120160738.edfe64806cc8b943beb1dfa0@linux-foundation.org> <20150122014550.GA21444@js1304-P5Q-DELUXE> <20150122144147.019eedc41f189eac44c3c4cd@freescale.com> <20150122212017.4b7032d52a6c75c06d5b4728@freescale.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-01-22 at 21:20 -0600, Kim Phillips wrote: > On Fri, 23 Jan 2015 08:49:36 +0900 > Akinobu Mita wrote: > > > 2015-01-23 5:41 GMT+09:00 Kim Phillips : > > > 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 > 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