From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralf Baechle Subject: Re: [PATCH] KVM/MIPS32: Export min_low_pfn. Date: Sun, 19 May 2013 11:22:21 +0200 Message-ID: <20130519092221.GD24568@linux-mips.org> References: <1368824818-22503-1-git-send-email-sanjayl@kymasys.com> <5196A458.7080400@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <5196A458.7080400@gmail.com> Sender: owner-linux-mm@kvack.org To: David Daney , David Howells , Tony Luck , Fenghua Yu , linux-ia64@vger.kernel.org, James Hogan , Michal Simek , microblaze-uclinux@itee.uq.edu.au, Chen Liqin , Paul Mundt , linux-sh@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , linux-arch@vger.kernel.org Cc: Sanjay Lal , linux-mips@linux-mips.org, kvm@vger.kernel.org, gleb@redhat.com, mtosatti@redhat.com List-Id: linux-arch.vger.kernel.org On Fri, May 17, 2013 at 02:42:48PM -0700, David Daney wrote: > 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. The comment is wrong. min_low_pfn is being referenced by pfn_valid() which is implemented (simplified for purposes of this discussion) like: int pfn_valid(unsigned long pfn) { return pfn >= min_low_pfn && pfn < max_mapnr; } > >+ */ > >+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. pfn_valid() should return 1 if for the pfn passed as the argment a struct page exists in mem_map[] - this only affects the flatmem case. However it is possible that min_low_pfn is bigger than ARCH_PFN_OFFSET in which case pfn_valid might return 0 even though it should have returned 1. So I fixed the issue like: static inline int pfn_valid(unsigned long pfn) { return pfn >= ARCH_PFN_OFFSET && pfn < max_mapnr; } frv, ia64, metag, microblaze, score and sh are also implementing pfn_valid referencing min_low_pfn. Time to move pfn_valid() to asm-generic, fix the min_low_pfn / ARCH_PFN_OFFSET issue and while at it, harden it against multiple evaluation of its arguments? Ralf -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eddie.linux-mips.org ([78.24.191.182]:54250 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753639Ab3ESJW4 (ORCPT ); Sun, 19 May 2013 05:22:56 -0400 Date: Sun, 19 May 2013 11:22:21 +0200 From: Ralf Baechle Subject: Re: [PATCH] KVM/MIPS32: Export min_low_pfn. Message-ID: <20130519092221.GD24568@linux-mips.org> References: <1368824818-22503-1-git-send-email-sanjayl@kymasys.com> <5196A458.7080400@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5196A458.7080400@gmail.com> Sender: linux-arch-owner@vger.kernel.org List-ID: To: David Daney , David Howells , Tony Luck , Fenghua Yu , linux-ia64@vger.kernel.org, James Hogan , Michal Simek , microblaze-uclinux@itee.uq.edu.au, Chen Liqin , Paul Mundt , linux-sh@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , linux-arch@vger.kernel.org Cc: Sanjay Lal , linux-mips@linux-mips.org, kvm@vger.kernel.org, gleb@redhat.com, mtosatti@redhat.com Message-ID: <20130519092221.EvrpDev71ZYLDDkyWg9tImCNe7x94m_i-7cSZNTjMcI@z> On Fri, May 17, 2013 at 02:42:48PM -0700, David Daney wrote: > 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. The comment is wrong. min_low_pfn is being referenced by pfn_valid() which is implemented (simplified for purposes of this discussion) like: int pfn_valid(unsigned long pfn) { return pfn >= min_low_pfn && pfn < max_mapnr; } > >+ */ > >+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. pfn_valid() should return 1 if for the pfn passed as the argment a struct page exists in mem_map[] - this only affects the flatmem case. However it is possible that min_low_pfn is bigger than ARCH_PFN_OFFSET in which case pfn_valid might return 0 even though it should have returned 1. So I fixed the issue like: static inline int pfn_valid(unsigned long pfn) { return pfn >= ARCH_PFN_OFFSET && pfn < max_mapnr; } frv, ia64, metag, microblaze, score and sh are also implementing pfn_valid referencing min_low_pfn. Time to move pfn_valid() to asm-generic, fix the min_low_pfn / ARCH_PFN_OFFSET issue and while at it, harden it against multiple evaluation of its arguments? Ralf From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralf Baechle Date: Sun, 19 May 2013 09:22:21 +0000 Subject: Re: [PATCH] KVM/MIPS32: Export min_low_pfn. Message-Id: <20130519092221.GD24568@linux-mips.org> List-Id: References: <1368824818-22503-1-git-send-email-sanjayl@kymasys.com> <5196A458.7080400@gmail.com> In-Reply-To: <5196A458.7080400@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: David Daney , David Howells , Tony Luck , Fenghua Yu , linux-ia64@vger.kernel.org, James Hogan , Michal Simek , microblaze-uclinux@itee.uq.edu.au, Chen Liqin , Paul Mundt , linux-sh@vger.kernel.org, linux-mm@kvack.org, Arnd Bergmann , linux-arch@vger.kernel.org Cc: Sanjay Lal , linux-mips@linux-mips.org, kvm@vger.kernel.org, gleb@redhat.com, mtosatti@redhat.com On Fri, May 17, 2013 at 02:42:48PM -0700, David Daney wrote: > 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. The comment is wrong. min_low_pfn is being referenced by pfn_valid() which is implemented (simplified for purposes of this discussion) like: int pfn_valid(unsigned long pfn) { return pfn >= min_low_pfn && pfn < max_mapnr; } > >+ */ > >+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. pfn_valid() should return 1 if for the pfn passed as the argment a struct page exists in mem_map[] - this only affects the flatmem case. However it is possible that min_low_pfn is bigger than ARCH_PFN_OFFSET in which case pfn_valid might return 0 even though it should have returned 1. So I fixed the issue like: static inline int pfn_valid(unsigned long pfn) { return pfn >= ARCH_PFN_OFFSET && pfn < max_mapnr; } frv, ia64, metag, microblaze, score and sh are also implementing pfn_valid referencing min_low_pfn. Time to move pfn_valid() to asm-generic, fix the min_low_pfn / ARCH_PFN_OFFSET issue and while at it, harden it against multiple evaluation of its arguments? Ralf From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 17 May 2013 23:07:15 +0200 (CEST) Received: from kymasys.com ([64.62.140.43]:50697 "HELO kymasys.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with SMTP id S6835013Ab3EQVHK3TVA8 (ORCPT ); Fri, 17 May 2013 23:07:10 +0200 Received: from agni.kymasys.com ([75.40.23.192]) by kymasys.com for ; Fri, 17 May 2013 14:07:00 -0700 Received: by agni.kymasys.com (Postfix, from userid 500) id A22D963004F; Fri, 17 May 2013 14:07:00 -0700 (PDT) From: Sanjay Lal To: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org, ralf@linux-mips.org, gleb@redhat.com, mtosatti@redhat.com, Sanjay Lal Subject: [PATCH] KVM/MIPS32: Export min_low_pfn. Date: Fri, 17 May 2013 14:06:58 -0700 Message-Id: <1368824818-22503-1-git-send-email-sanjayl@kymasys.com> X-Mailer: git-send-email 1.7.11.3 In-Reply-To: References: Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 36437 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: sanjayl@kymasys.com 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 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); -- 1.7.11.3 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 17 May 2013 23:43:02 +0200 (CEST) Received: from mail-pd0-f181.google.com ([209.85.192.181]:59397 "EHLO mail-pd0-f181.google.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6835012Ab3EQVm55-Fyb (ORCPT ); Fri, 17 May 2013 23:42:57 +0200 Received: by mail-pd0-f181.google.com with SMTP id p11so3724448pdj.12 for ; Fri, 17 May 2013 14:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=mP14dtb7TCg9Wwd3NzfVNCMK8SL2/ZoRv1rQOJXTzmc=; b=Jryd3sdy7Our78Wzv49RLd8P2mWwqBfU5Ef29+y1x94yxm4EXAWX2uXySpRdZXjkU5 keQOdkF5DJovt18qbqbfgh5QXERSCvkj9bf0BM/TiBo4IJicM5X4TvTNWAPylMZJHZ5g 7KBdC7gAA3iaK4fdW7znVBs8IKvzlhVCa7uhN/iQh4aA81OO8QkOvKkDY1VI2BZtt9/c XNn98Lv7+I43vC6mbdDcaPGmFpOs8f58Y9bRNWzE9jt5V6PEbtkn6MrKJZI33hoIV8t6 jC5E+5EtLJFcvdmzNPRTuFEDasDtFHh3wsIzknskVkBF/biGtOpfL+G9SfqP0yLfP/6a +TJg== X-Received: by 10.66.159.6 with SMTP id wy6mr50638532pab.206.1368826971155; Fri, 17 May 2013 14:42:51 -0700 (PDT) Received: from dl.caveonetworks.com (64.2.3.195.ptr.us.xo.net. [64.2.3.195]) by mx.google.com with ESMTPSA id fn9sm13785547pab.2.2013.05.17.14.42.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 17 May 2013 14:42:49 -0700 (PDT) Message-ID: <5196A458.7080400@gmail.com> Date: Fri, 17 May 2013 14:42:48 -0700 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Sanjay Lal CC: linux-mips@linux-mips.org, kvm@vger.kernel.org, ralf@linux-mips.org, gleb@redhat.com, mtosatti@redhat.com Subject: Re: [PATCH] KVM/MIPS32: Export min_low_pfn. References: <1368824818-22503-1-git-send-email-sanjayl@kymasys.com> In-Reply-To: <1368824818-22503-1-git-send-email-sanjayl@kymasys.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 36442 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: ddaney.cavm@gmail.com 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 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 > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Sat, 18 May 2013 08:36:48 +0200 (CEST) Received: from mx1.redhat.com ([209.132.183.28]:38945 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6817667Ab3ERGgnZX4NJ (ORCPT ); Sat, 18 May 2013 08:36:43 +0200 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4I6aY2Y010572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 18 May 2013 02:36:35 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-4-26.tlv.redhat.com [10.35.4.26]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r4I6aYZX013694; Sat, 18 May 2013 02:36:34 -0400 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id 27A641336CE; Sat, 18 May 2013 09:36:33 +0300 (IDT) Date: Sat, 18 May 2013 09:36:33 +0300 From: Gleb Natapov To: David Daney Cc: Sanjay Lal , linux-mips@linux-mips.org, kvm@vger.kernel.org, ralf@linux-mips.org, mtosatti@redhat.com Subject: Re: [PATCH] KVM/MIPS32: Export min_low_pfn. Message-ID: <20130518063633.GC12957@redhat.com> References: <1368824818-22503-1-git-send-email-sanjayl@kymasys.com> <5196A458.7080400@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5196A458.7080400@gmail.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 36447 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: gleb@redhat.com 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 On Fri, May 17, 2013 at 02:42:48PM -0700, David Daney wrote: > 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? > He did answered here: http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/109895. I suggested mips_ksyms.c solution as an option. > 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. > Exports are different. You define interface between the kernel and modules here, exporting the symbol may not be desirable for some arch. And min_low_pfn is not the only example. Anything in arch _ksyms files is like that: exported by some archs but not the others. -- Gleb.