[Top] [All Lists]

Re: [PATCH] KVM/MIPS32: Export min_low_pfn.

To: Sanjay Lal <>
Subject: Re: [PATCH] KVM/MIPS32: Export min_low_pfn.
From: David Daney <>
Date: Fri, 17 May 2013 14:42:48 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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==
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <n> <>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4
On 05/17/2013 02:06 PM, Sanjay Lal wrote:
The KVM module uses the standard MIPS cache management routines, which use 
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 <linux/mm.h>
  #include <asm/uaccess.h>
  #include <asm/ftrace.h>
+#include <linux/bootmem.h>

  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 */
+/* The KVM module uses the standard MIPS cache functions which use
+ * min_low_pfn, requiring it to be exported.
+ */

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

<Prev in Thread] Current Thread [Next in Thread>