All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mips: Export min_low_pfn if CONFIG_FLATMEM
@ 2012-12-28 20:40 Geert Uytterhoeven
  2012-12-28 21:44 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2012-12-28 20:40 UTC (permalink / raw)
  To: Ralf Baechle, linux-mips; +Cc: linux-kernel, Geert Uytterhoeven

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mips: Export min_low_pfn if CONFIG_FLATMEM
  2012-12-28 20:40 [PATCH] mips: Export min_low_pfn if CONFIG_FLATMEM Geert Uytterhoeven
@ 2012-12-28 21:44 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2012-12-28 21:44 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-mips, linux-kernel

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 <geert@linux-m68k.org>
> ---
> 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 <linux/bootmem.h>
> +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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-28 21:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-28 20:40 [PATCH] mips: Export min_low_pfn if CONFIG_FLATMEM Geert Uytterhoeven
2012-12-28 21:44 ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.