From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 28 Dec 2012 22:44:54 +0100 (CET) Received: from localhost.localdomain ([127.0.0.1]:42031 "EHLO linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP id S6823072Ab2L1VoxqYtbn (ORCPT ); Fri, 28 Dec 2012 22:44:53 +0100 Received: from scotty.linux-mips.net (localhost.localdomain [127.0.0.1]) by scotty.linux-mips.net (8.14.5/8.14.4) with ESMTP id qBSLipdT017231; Fri, 28 Dec 2012 22:44:51 +0100 Received: (from ralf@localhost) by scotty.linux-mips.net (8.14.5/8.14.5/Submit) id qBSLim95017230; Fri, 28 Dec 2012 22:44:48 +0100 Date: Fri, 28 Dec 2012 22:44:48 +0100 From: Ralf Baechle To: Geert Uytterhoeven Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mips: Export min_low_pfn if CONFIG_FLATMEM Message-ID: <20121228214448.GB6786@linux-mips.org> References: <1356727256-3172-1-git-send-email-geert@linux-m68k.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1356727256-3172-1-git-send-email-geert@linux-m68k.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-archive-position: 35346 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: ralf@linux-mips.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Return-Path: On Fri, Dec 28, 2012 at 09:40:56PM +0100, Geert Uytterhoeven wrote: > Subject: [PATCH] mips: Export min_low_pfn if CONFIG_FLATMEM > > If CONFIG_FLATMEM=y on MIPS, pfn_valid() (and thus virt_addr_valid()) uses > min_low_pfn. However, min_low_pfn is not exported by the generic bootmem > code. > > As of commit e52a29326462badd9ceec90a9eb2ac2a8550e02e ("aoe: avoid races > between device destruction and discovery"), aoeblk_open() uses > virt_addr_valid(), causing a link error in the modular case: > > ERROR: "min_low_pfn" [drivers/block/aoe/aoe.ko] undefined! > > Add a custom export to fix this, just like is done for ia64 in > arch/ia64/kernel/ia64_ksyms.c. > > Signed-off-by: Geert Uytterhoeven > --- > http://kisskb.ellerman.id.au/kisskb/buildresult/7864918/ > > arch/mips/kernel/mips_ksyms.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c > index df1e3e4..8579bb8 100644 > --- a/arch/mips/kernel/mips_ksyms.c > +++ b/arch/mips/kernel/mips_ksyms.c > @@ -60,3 +60,8 @@ EXPORT_SYMBOL(invalid_pte_table); > /* _mcount is defined in arch/mips/kernel/mcount.S */ > EXPORT_SYMBOL(_mcount); > #endif > + > +#ifdef CONFIG_FLATMEM > +#include > +EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not exported by generic code */ > +#endif I've already applied a different patch which turns virt_addr_valid() into a normal function and exports it. Thanks, Ralf