[Top] [All Lists]

[PATCH] mips: Export min_low_pfn if CONFIG_FLATMEM

To: Ralf Baechle <>,
Subject: [PATCH] mips: Export min_low_pfn if CONFIG_FLATMEM
From: Geert Uytterhoeven <>
Date: Fri, 28 Dec 2012 21:40:56 +0100
Cc:, Geert Uytterhoeven <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
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

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

Signed-off-by: Geert Uytterhoeven <>

 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 */
+#include <linux/bootmem.h>
+EXPORT_SYMBOL(min_low_pfn);    /* defined by bootmem.c, but not exported by 
generic code */

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