From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Daney Subject: Re: [PATCH] KVM/MIPS32: Export min_low_pfn. Date: Fri, 17 May 2013 14:42:48 -0700 Message-ID: <5196A458.7080400@gmail.com> References: <1368824818-22503-1-git-send-email-sanjayl@kymasys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-mips@linux-mips.org, kvm@vger.kernel.org, ralf@linux-mips.org, gleb@redhat.com, mtosatti@redhat.com To: Sanjay Lal Return-path: Received: from mail-da0-f42.google.com ([209.85.210.42]:48183 "EHLO mail-da0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754071Ab3EQVmv (ORCPT ); Fri, 17 May 2013 17:42:51 -0400 Received: by mail-da0-f42.google.com with SMTP id r6so1346792dad.1 for ; Fri, 17 May 2013 14:42:51 -0700 (PDT) In-Reply-To: <1368824818-22503-1-git-send-email-sanjayl@kymasys.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/17/2013 02:06 PM, Sanjay Lal wrote: > The KVM module uses the standard MIPS cache management routines, which use min_low_pfn. > This creates and indirect dependency, requiring min_low_pfn to be exported. > > Signed-off-by: Sanjay Lal > --- > arch/mips/kernel/mips_ksyms.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c > index 6e58e97..0299472 100644 > --- a/arch/mips/kernel/mips_ksyms.c > +++ b/arch/mips/kernel/mips_ksyms.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > > extern void *__bzero(void *__s, size_t __count); > extern long __strncpy_from_user_nocheck_asm(char *__to, > @@ -60,3 +61,8 @@ EXPORT_SYMBOL(invalid_pte_table); > /* _mcount is defined in arch/mips/kernel/mcount.S */ > EXPORT_SYMBOL(_mcount); > #endif > + > +/* The KVM module uses the standard MIPS cache functions which use > + * min_low_pfn, requiring it to be exported. > + */ > +EXPORT_SYMBOL(min_low_pfn); I think I asked this before, but I don't remember the answer: Why not put EXPORT_SYMBOL(min_low_pfn) in mm/bootmem.c adjacent to where the symbol is defined? Cluttering up the kernel with multiple architectures all doing architecture specific exports of the same symbol is not a clean way of doing things. The second time something needs to be done, it should be factored out into common code. David Daney >